Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
fix: tests for new IPNS name formatting (#141)
Browse files Browse the repository at this point in the history
* test: update tests for new IPNS key format

* style: fix

* fix: package.json

* fix: package.json

* fix: test updates
  • Loading branch information
petar committed Jul 29, 2020
1 parent 80652b2 commit 6821a5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -51,6 +51,7 @@
"mocha": "^8.0.1",
"multihashes": "^1.0.1",
"nanoid": "^3.1.10",
"peer-id": "^0.13.13",
"p-retry": "^4.1.0",
"pretty-bytes": "^5.1.0",
"promisify-es6": "^1.0.3",
Expand Down
3 changes: 2 additions & 1 deletion test/ipns-pubsub.js
@@ -1,6 +1,7 @@
/* eslint-env mocha */
'use strict'

const PeerID = require('peer-id')
const { fromB58String } = require('multihashes')
const base64url = require('base64url')
const ipns = require('ipns')
Expand Down Expand Up @@ -110,7 +111,7 @@ const subscribeToReceiveByPubsub = async (nodeA, nodeB, idA, idB) => {
await waitFor(() => subscribed === true, (50 * 1000))
const res2 = await last(nodeB.api.name.resolve(idA))

expect(res1.name).to.equal(idA) // Published to Node A ID
expect(PeerID.createFromCID(res1.name).toString()).to.equal(PeerID.createFromB58String(idA).toString()) // Published to Node A ID
expect(res2).to.equal(ipfsRef)
}

Expand Down

0 comments on commit 6821a5d

Please sign in to comment.