Skip to content

Commit

Permalink
Add extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Nov 29, 2024
1 parent 80dceac commit 1117b0d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions substrate/frame/revive/rpc/examples/js/src/geth-diff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,21 @@ for (const env of envs) {
}
})

test('eth_call transfer (not enough funds)', async () => {
expect.assertions(3)
try {
await env.accountWallet.sendTransaction({
to: '0x75E480dB528101a381Ce68544611C169Ad7EB342',
value: parseEther('10'),
})
} catch (err) {
const lastJsonRpcError = jsonRpcErrors.pop()
expect(lastJsonRpcError?.code).toBe(-32000)
expect(lastJsonRpcError?.message).toInclude('insufficient funds')
expect(lastJsonRpcError?.data).toBeUndefined()
}
})

test('eth_estimate (not enough funds)', async () => {
expect.assertions(3)
try {
Expand Down

0 comments on commit 1117b0d

Please sign in to comment.