Skip to content

Commit

Permalink
Test interface updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Dec 14, 2017
1 parent 1105de7 commit 01df043
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/client-p2p/src/create/listener.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ describe('createListener', () => {
});

it('validates the IP address', () => {
createListener('no.ip.is.here').catch((error) => {
return createListener('no.ip.is.here').catch((error) => {
expect(error.message).toMatch(/valid IP address/);
});
});

it('validates the port', () => {
createListener('127.0.0.1', 'notAPort').catch((error) => {
return createListener('127.0.0.1', 'notAPort').catch((error) => {
expect(error.message).toMatch(/valid numeric port/);
});
});
Expand All @@ -56,7 +56,7 @@ describe('createListener', () => {
it('fails when PeerInfo.create fails', () => {
PeerInfo.create = (cb) => cb(new Error('test create failure'));

createListener('127.0.0.1', 999).catch((error) => {
return createListener('127.0.0.1', 999).catch((error) => {
expect(error.message).toMatch(/test create failure/);
});
});
Expand Down
4 changes: 3 additions & 1 deletion packages/client-p2p/src/server.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ const Server = require('./index');
describe('Server', () => {
describe('constructor', () => {
it('creates the instance', () => {
expect(new Server({}, {}, false)).toBeDefined();
expect(
new Server({}, {}, false)
).toBeDefined();
});
});
});

0 comments on commit 01df043

Please sign in to comment.