From 4a2fede9f60a8f635b254db1a9eadfdfa459d426 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 8 Jan 2025 13:04:03 +0100 Subject: [PATCH] add test --- libs/remix-simulator/test/blocks.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/remix-simulator/test/blocks.ts b/libs/remix-simulator/test/blocks.ts index e0eb39d6c9c..402c149619c 100644 --- a/libs/remix-simulator/test/blocks.ts +++ b/libs/remix-simulator/test/blocks.ts @@ -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) @@ -40,7 +51,7 @@ describe('blocks', () => { assert.deepEqual(block, expectedBlock) }) - }) + }) describe('eth_getGasPrice', () => { it('should get gas price', async () => {