Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: fixing incorrect timeout function invocation
  • Loading branch information
dryajov committed Oct 17, 2017
commit a480f37c190891434bf5be9da86a5cb4debc111c
2 changes: 1 addition & 1 deletion test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Swarm = require('../src')

describe('basics', () => {
it('throws on missing peerInfo', (done) => {
expect(Swarm).to.throw()
expect(Swarm).to.throw(/You must provide a `peerInfo`/)
done()
})
})
Expand Down
4 changes: 3 additions & 1 deletion test/swarm-with-muxing.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ describe('high level API - with everything mixed all together!', () => {
done()
}
}

swarmC.handle('/mamao/1.0.0', (protocol, conn) => {
conn.getPeerInfo((err, peerInfo) => {
expect(err).to.not.exist()
Expand Down Expand Up @@ -263,7 +264,8 @@ describe('high level API - with everything mixed all together!', () => {
})
})

it('close a muxer emits event', (done) => {
it('close a muxer emits event', function (done) {
this.timeout(2500)
parallel([
(cb) => swarmC.close(cb),
(cb) => swarmA.once('peer-mux-closed', (peerInfo) => cb())
Expand Down
3 changes: 2 additions & 1 deletion test/transport-tcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ describe('transport - tcp', () => {
})
})

it('.close', (done) => {
it('.close', function (done) {
this.timeout(2500)
parallel([
(cb) => swarmA.transport.close('tcp', cb),
(cb) => swarmB.transport.close('tcp', cb)
Expand Down