Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed Jan 8, 2025
1 parent f6602ce commit 4a2fede
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion libs/remix-simulator/test/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ describe('blocks', () => {
web3.setProvider(provider as any)
})

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_getBlockByNumber', () => {
it('should get block given its number', async () => {
const block = await web3.eth.getBlock(0)
Expand Down Expand Up @@ -40,7 +51,7 @@ describe('blocks', () => {

assert.deepEqual(block, expectedBlock)
})
})
})

describe('eth_getGasPrice', () => {
it('should get gas price', async () => {
Expand Down

0 comments on commit 4a2fede

Please sign in to comment.