mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Fix public key test.
This commit is contained in:
parent
82fcc830ec
commit
b0483a1b60
@ -1,6 +1,7 @@
|
||||
import { strictEqual, deepStrictEqual, deepEqual } from 'assert'
|
||||
import * as crypto from '@libp2p/crypto'
|
||||
import { Buffer } from 'safe-buffer'
|
||||
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
|
||||
import rmrf from 'rimraf'
|
||||
import { copy } from 'fs-extra'
|
||||
import KeyStore, { signMessage, verifyMessage } from '../src/key-store.js'
|
||||
@ -296,7 +297,7 @@ describe('KeyStore', () => {
|
||||
const expected = '02e7247a4c155b63d182a23c70cb6fe8ba2e44bc9e9d62dc45d4c4167ccde95944'
|
||||
const publicKey = await keystore.getPublic(key, { format: 'buffer' })
|
||||
|
||||
deepStrictEqual(publicKey.toString('hex'), expected)
|
||||
deepStrictEqual(uint8ArrayToString(publicKey, 'base16'), expected)
|
||||
})
|
||||
|
||||
it('throws an error if no keys are passed', async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user