Skip to content

Commit 0f19f94

Browse files
committed
evm_mine test
1 parent d7b40c0 commit 0f19f94

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

test/ganache.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const chai = require("chai");
2+
const assert = chai.assert;
3+
const baseHelpers = require("./helpers/base.js");
4+
const ganache = require("./helpers/ganache.js");
5+
6+
const providers = baseHelpers.providers;
7+
8+
providers.forEach(web3 => {
9+
describe("ganache - " + web3.currentProvider.constructor.name, () => {
10+
it("should mine new block with evm_mine", async () => {
11+
const blockBefore = await web3.eth.getBlock("latest");
12+
13+
await ganache.advanceBlock(web3);
14+
15+
const blockAfter = await web3.eth.getBlock("latest");
16+
17+
assert.notEqual(blockAfter.hash, blockBefore.hash);
18+
});
19+
20+
it("should take and revert an evm snapshot");
21+
});
22+
});

0 commit comments

Comments
 (0)