Skip to content

Commit e1d5ae2

Browse files
committed
feat: test revert (#4630)
Signed-off-by: Mariusz Jasuwienas <[email protected]>
1 parent fe159bc commit e1d5ae2

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

packages/server/tests/integration/server.spec.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,13 @@ describe('RPC Server', function () {
302302
});
303303

304304
it('should execute "eth_getTransactionByHash with missing transaction"', async function () {
305-
try {
306-
await testClient.post('/', {
307-
id: '2',
308-
jsonrpc: '2.0',
309-
method: RelayCalls.ETH_ENDPOINTS.ETH_GET_TRANSACTION_BY_HASH,
310-
params: ['0x4a563af33c4871b51a8b108aa2fe1dd5280a30dfb7237170ae5e5e7957eb6392'],
311-
});
312-
} catch (error: any) {
313-
expect(error.message).to.equal('Request failed with status code 404');
314-
}
305+
const res = await testClient.post('/', {
306+
id: '2',
307+
jsonrpc: '2.0',
308+
method: RelayCalls.ETH_ENDPOINTS.ETH_GET_TRANSACTION_BY_HASH,
309+
params: ['0x4a563af33c4871b51a8b108aa2fe1dd5280a30dfb7237170ae5e5e7957eb6392'],
310+
});
311+
expect(res.data.result).to.be.null;
315312
});
316313

317314
it('should execute "eth_getUncleByBlockHashAndIndex"', async function () {

0 commit comments

Comments
 (0)