Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Jan 13, 2025
1 parent 6125577 commit ec94174
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libs/remix-simulator/test/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ describe('blocks', () => {
})
})

describe('evm_mine', () => {
it('should mine empty block using evm_mine', async function () {
await web3.provider.request({
method: 'evm_mine',
params: [{ blocks: 3 }],
})
const number = await web3.eth.getBlockNumber()
assert.equal(number, 3)
})
})

describe('eth_getBlockByHash', () => {
it('should get block given its hash', async () => {
const correctBlock = await web3.eth.getBlock(0)
Expand Down

0 comments on commit ec94174

Please sign in to comment.