diff --git a/package.json b/package.json index eac4fa7..de8584b 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ "homepage": "https://github.com/mkg20001/interface-data-exchange#readme", "dependencies": {}, "devDependencies": { - "aegir": "^19.0.4", - "interface-data-exchange-devdeps": "0.1.0" + "aegir": "^20.0.0", + "interface-data-exchange-devdeps": "0.1.2" }, "contributors": [ "Maciej Krüger " diff --git a/src/test/index.js b/src/test/index.js index ef6f493..e4324fc 100644 --- a/src/test/index.js +++ b/src/test/index.js @@ -63,7 +63,7 @@ module.exports = (common) => { it('request "test" b->a should fail', async () => { try { - const result = exchangeB.request(peerA.peerInfo.id, 'test', Buffer.from(String(num))) + const result = await exchangeB.request(peerA.peerInfo.id, 'test', Buffer.from(String(num))) expect(result).to.not.exist() } catch (err) { expect(err).to.exist() @@ -72,7 +72,7 @@ module.exports = (common) => { it('request to non-existent peer should fail', async () => { try { - const result = exchangeB.request(peerE.id, 'test', Buffer.from(String(num))) + const result = await exchangeB.request(peerE.id, 'test', Buffer.from(String(num))) expect(result).to.not.exist() } catch (err) { expect(err).to.exist() diff --git a/src/test/utils.js b/src/test/utils.js index df0d756..2acd9c9 100644 --- a/src/test/utils.js +++ b/src/test/utils.js @@ -1,7 +1,6 @@ 'use strict' const ids = require('./ids.json') -const promisify = require('promisify-es6') const Id = require('peer-id') const Peer = require('peer-info') @@ -11,7 +10,7 @@ const MPLEX = require('libp2p-mplex') const SECIO = require('libp2p-secio') const createPeerInfo = async (id) => { - return new Peer(await promisify(Id.createFromJSON.bind(Id, ids[id]))()) + return new Peer(await Id.createFromJSON(ids[id])) } const createPeer = async (id, opt) => {