mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-06-25 23:21:49 +00:00
feat: change toPrint output to match go implementation
This commit is contained in:
committed by
David Dias
parent
a786018528
commit
e8ab1b9281
@ -136,9 +136,10 @@ describe('PeerId', () => {
|
||||
it('Pretty printing', (done) => {
|
||||
PeerId.create(testOpts, (err, id1) => {
|
||||
expect(err).to.not.exist()
|
||||
PeerId.createFromPrivKey(id1.toPrint().privKey, (err, id2) => {
|
||||
PeerId.createFromPrivKey(id1.toJSON().privKey, (err, id2) => {
|
||||
expect(err).to.not.exist()
|
||||
expect(id1.toPrint()).to.be.eql(id2.toPrint())
|
||||
expect(id1.toPrint()).to.equal('<peer.ID ' + id1.toB58String().substr(2, 6) + '>')
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user