diff --git a/js/src/api/format/output.spec.js b/js/src/api/format/output.spec.js index b44047610..d791e340c 100644 --- a/js/src/api/format/output.spec.js +++ b/js/src/api/format/output.spec.js @@ -147,10 +147,50 @@ describe('api/format/output', () => { describe('outPeers', () => { it('converts all internal numbers to BigNumbers', () => { - expect(outPeers({ active: 789, connected: '456', max: 0x7b })).to.deep.equal({ + expect(outPeers({ + active: 789, + connected: '456', + max: 0x7b, + peers: [ + { + caps: ["par/1"], + id: "0x01", + name: "Parity", + network: { + localAddress: "10.0.0.1", + remoteAddress: "10.0.0.1" + }, + protocols: { + par: { + difficulty: "0x0f", + head: "0x02", + version: 63 + } + } + } + ] + })).to.deep.equal({ active: new BigNumber(789), connected: new BigNumber(456), - max: new BigNumber(123) + max: new BigNumber(123), + peers: [ + { + caps: ["par/1"], + id: "0x01", + name: "Parity", + network: { + localAddress: "10.0.0.1", + remoteAddress: "10.0.0.1" + }, + protocols: { + par: { + difficulty: new BigNumber(15), + head: "0x02", + version: 63 + } + } + } + ] }); }); }); diff --git a/js/src/api/rpc/parity/parity.spec.js b/js/src/api/rpc/parity/parity.spec.js index d0d97cd0b..b58c8f85c 100644 --- a/js/src/api/rpc/parity/parity.spec.js +++ b/js/src/api/rpc/parity/parity.spec.js @@ -80,7 +80,7 @@ describe('api/rpc/parity', () => { describe('newPeers', () => { it('returns the peer structure, formatted', () => { - mockHttp([{ method: 'parity_netPeers', reply: { result: { active: 123, connected: 456, max: 789 } } }]); + mockHttp([{ method: 'parity_netPeers', reply: { result: { active: 123, connected: 456, max: 789, peers: [] } } }]); return instance.netPeers().then((peers) => { expect(peers.active.eq(123)).to.be.true;