mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-29 02:11:49 +00:00
chore: add error codes (#155)
* chore: add error codes * chore: create errors with new Error() * fix: better error testin * refactor: simplify random bytes error checks
This commit is contained in:
@ -116,7 +116,7 @@ describe('ed25519', function () {
|
||||
expect(valid).to.be.eql(false)
|
||||
})
|
||||
|
||||
describe('returns error via cb instead of crashing', () => {
|
||||
describe('throws error instead of crashing', () => {
|
||||
const key = crypto.keys.unmarshalPublicKey(fixtures.verify.publicKey)
|
||||
testGarbage.doTests('key.verify', key.verify.bind(key), 2)
|
||||
testGarbage.doTests('crypto.keys.unmarshalPrivateKey', crypto.keys.unmarshalPrivateKey.bind(crypto.keys))
|
||||
|
Reference in New Issue
Block a user