Skip to content

Commit 40b57bb

Browse files
committed
Apply PR comments for test files
1 parent f8241e6 commit 40b57bb

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/web3js/debug_traces_test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ it('should retrieve transaction traces', async () => {
3030
let txTrace = response.body.result
3131
assert.equal(txTrace.gas, 1200498)
3232
assert.equal(txTrace.failed, false)
33-
assert.lengthOf(txTrace.returnValue, 10236n)
33+
assert.lengthOf(txTrace.returnValue, 10236)
3434
assert.deepEqual(
3535
txTrace.structLogs[0],
3636
{
@@ -63,8 +63,8 @@ it('should retrieve transaction traces', async () => {
6363
assert.equal(txTrace.gas, '0x127b39')
6464
assert.equal(txTrace.gasUsed, '0x125172')
6565
assert.equal(txTrace.to, '0x99a64c993965f8d69f985b5171bc20065cc32fab')
66-
assert.lengthOf(txTrace.input, 10454n)
67-
assert.lengthOf(txTrace.output, 10236n)
66+
assert.lengthOf(txTrace.input, 10454)
67+
assert.lengthOf(txTrace.output, 10236)
6868
assert.isUndefined(txTrace.logs)
6969
assert.equal(txTrace.value, '0x0')
7070
assert.equal(txTrace.type, 'CREATE')

tests/web3js/eth_state_overrides_test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ it('should apply state overrides on previously deployed contract', async () => {
1010
let callGetDeployer = deployed.contract.methods.getDeployer().encodeABI()
1111

1212
const initValue = 1337
13-
let result = await web3.eth.call({ to: contractAddress, data: callRetrieve }, 'latest')
14-
assert.equal(result, initValue)
13+
const raw = await web3.eth.call({ to: contractAddress, data: callRetrieve }, 'latest')
14+
const decoded = web3.eth.abi.decodeParameter('uint256', raw)
15+
assert.strictEqual(Number(decoded), initValue)
1516

1617
// check that `eth_call` can handle `stateDiff` state overrides
1718
// override only the first storage slot
@@ -188,8 +189,9 @@ it('should apply state overrides on non-existent contract', async () => {
188189
let callGetDeployer = deployed.contract.methods.getDeployer().encodeABI()
189190

190191
const initValue = 1337
191-
let result = await web3.eth.call({ to: deployed.receipt.contractAddress, data: callRetrieve }, 'latest')
192-
assert.equal(result, initValue)
192+
const raw = await web3.eth.call({ to: deployed.receipt.contractAddress, data: callRetrieve }, 'latest')
193+
const decoded = web3.eth.abi.decodeParameter('uint256', raw)
194+
assert.strictEqual(Number(decoded), initValue)
193195

194196
// check that `eth_call` can handle `stateDiff` state overrides
195197
// override only the first storage slot

0 commit comments

Comments
 (0)