From c8d0a259c733585ec7c4b54c02ccbab437bfaf9d Mon Sep 17 00:00:00 2001 From: ScottyPoi Date: Fri, 26 Jul 2024 14:27:53 -0600 Subject: [PATCH] add tests for error code --- packages/client/test/rpc/eth/call.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/client/test/rpc/eth/call.spec.ts b/packages/client/test/rpc/eth/call.spec.ts index 5672647b35..a0d889faaa 100644 --- a/packages/client/test/rpc/eth/call.spec.ts +++ b/packages/client/test/rpc/eth/call.spec.ts @@ -101,6 +101,7 @@ 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), @@ -108,6 +109,7 @@ describe(method, () => { ) 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),