Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
standielpls committed Oct 2, 2024
1 parent 22270ca commit 302738a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/test/tools/rpc-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ describe('rpc client', () => {
});

it('should handle an explosion', () => {
// mock 3 explosions due to retry
mocky.mockRpcFail('this is an expected explosion');
mocky.mockRpcFail('this is an expected explosion');
mocky.mockRpcFail('this is an expected explosion');

return rpc('explode')
.then(() => {
throw new Error('this should have exploded');
})
.catch((err) => {
err.message.should.eql('this is an expected explosion');
err.message.should.eql(
'RPC request failed after 3 attempts: this is an expected explosion'
);
});
});

Expand Down

0 comments on commit 302738a

Please sign in to comment.