mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-13 15:51:34 +00:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
228c2b09de | |||
faa5433f8d | |||
de53a00e4d | |||
cf45341754 |
11
package.json
11
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "libp2p-identify",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"description": "libp2p Identify Protocol",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
@ -37,15 +37,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/libp2p/js-libp2p-identify#readme",
|
||||
"devDependencies": {
|
||||
"aegir": "^10.0.0",
|
||||
"aegir": "^11.0.0",
|
||||
"chai": "^3.5.0",
|
||||
"dirty-chai": "^1.2.2",
|
||||
"pre-commit": "^1.2.2",
|
||||
"pull-pair": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"multiaddr": "^2.2.1",
|
||||
"peer-id": "~0.8.2",
|
||||
"peer-info": "~0.8.3",
|
||||
"multiaddr": "^2.2.2",
|
||||
"peer-id": "~0.8.4",
|
||||
"peer-info": "~0.8.4",
|
||||
"protocol-buffers": "^3.2.1",
|
||||
"pull-length-prefixed": "^1.2.0",
|
||||
"pull-stream": "^3.5.0"
|
||||
|
@ -2,7 +2,10 @@
|
||||
'use strict'
|
||||
|
||||
const pull = require('pull-stream')
|
||||
const expect = require('chai').expect
|
||||
const chai = require('chai')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
const expect = chai.expect
|
||||
chai.use(dirtyChai)
|
||||
const pair = require('pull-pair/duplex')
|
||||
const PeerInfo = require('peer-info')
|
||||
const lp = require('pull-length-prefixed')
|
||||
@ -42,12 +45,9 @@ describe('identify.dialer', () => {
|
||||
)
|
||||
|
||||
identify.dialer(p[1], (err, info, observedAddrs) => {
|
||||
expect(err).to.not.exist
|
||||
expect(
|
||||
info.id.pubKey.bytes
|
||||
).to.be.eql(
|
||||
original.id.pubKey.bytes
|
||||
)
|
||||
expect(err).to.not.exist()
|
||||
expect(info.id.pubKey.bytes)
|
||||
.to.eql(original.id.pubKey.bytes)
|
||||
|
||||
expect(
|
||||
info.multiaddrs
|
||||
|
@ -1,16 +1,15 @@
|
||||
/* eslint-env mocha */
|
||||
'use strict'
|
||||
|
||||
const expect = require('chai').expect
|
||||
const chai = require('chai')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
const expect = chai.expect
|
||||
chai.use(dirtyChai)
|
||||
|
||||
const identify = require('../src')
|
||||
|
||||
describe('identify', () => {
|
||||
it('multicodec', () => {
|
||||
expect(
|
||||
identify.multicodec
|
||||
).to.be.eql(
|
||||
'/ipfs/id/1.0.0'
|
||||
)
|
||||
expect(identify.multicodec).to.eql('/ipfs/id/1.0.0')
|
||||
})
|
||||
})
|
||||
|
@ -2,7 +2,10 @@
|
||||
'use strict'
|
||||
|
||||
const pull = require('pull-stream')
|
||||
const expect = require('chai').expect
|
||||
const chai = require('chai')
|
||||
const dirtyChai = require('dirty-chai')
|
||||
const expect = chai.expect
|
||||
chai.use(dirtyChai)
|
||||
const pair = require('pull-pair/duplex')
|
||||
const PeerInfo = require('peer-info')
|
||||
const lp = require('pull-length-prefixed')
|
||||
@ -31,7 +34,7 @@ describe('identify.listener', () => {
|
||||
p[1],
|
||||
lp.decode(),
|
||||
pull.collect((err, result) => {
|
||||
expect(err).to.not.exist
|
||||
expect(err).to.not.exist()
|
||||
|
||||
const input = msg.decode(result[0])
|
||||
expect(
|
||||
|
Reference in New Issue
Block a user