Skip to content

Commit

Permalink
add tests for error code
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyPoi committed Jul 26, 2024
1 parent 361b3cd commit c8d0a25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/client/test/rpc/eth/call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,15 @@ describe(method, () => {
{ ...estimateTxData, gas: estimateTxData.gasLimit },
'latest',
])
assert.equal(res.error.code, 3, 'should return the correct error code')
assert.equal(
res.error.data,
bytesToHex(execResult.returnValue),
'should return the correct return value',
)

res = await rpc.request(method, [{ ...estimateTxData }, 'latest'])
assert.equal(res.error.code, 3, 'should return the correct error code')
assert.equal(
res.error.data,
bytesToHex(execResult.returnValue),
Expand Down

0 comments on commit c8d0a25

Please sign in to comment.