Skip to content

Commit

Permalink
Fix disconnect test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ybrin committed Nov 9, 2020
1 parent 252097c commit cc17055
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/eth.subscribe.ganache.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ describe('subscription connect/reconnect', function () {
.once('data', async function () {
await pify(server.close)();
})
.on('error', function (err) {
counter++;
assert(err.message.includes('CONNECTION ERROR'));
assert(err.message.includes('close code `1006`'));
assert(err.message.includes('Connection dropped by remote peer.'));
});

web3.eth.currentProvider.on('close', function (err) {
counter++;
assert(err.reason.includes('Connection dropped by remote peer.'));
assert(err.code === 1006);
});

// Make sure error handler doesn't fire twice
await waitSeconds(2);
Expand Down

0 comments on commit cc17055

Please sign in to comment.