-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2184 from fboucquez/fboucquez/feat/skipVerificati…
…onV6 feat: initEccLib skip verification (v6)
- Loading branch information
Showing
7 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { initEccLib } from '../src'; | ||
import { describe, test } from 'mocha'; | ||
import * as assert from 'assert'; | ||
|
||
describe(`initEccLib`, () => { | ||
beforeEach(() => { | ||
initEccLib(undefined); | ||
}); | ||
|
||
test('initEccLib should fail when invalid', () => { | ||
assert.throws(() => { | ||
initEccLib({ isXOnlyPoint: () => false } as any); | ||
}, 'Error: ecc library invalid'); | ||
}); | ||
|
||
test('initEccLib should not fail when DANGER_DO_NOT_VERIFY_ECCLIB = true', () => { | ||
initEccLib({ isXOnlyPoint: () => false } as any, { | ||
DANGER_DO_NOT_VERIFY_ECCLIB: true, | ||
}); | ||
assert.ok('it does not fail, verification is excluded'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters