Add sol-cover implementation
This commit is contained in:
@@ -3,20 +3,19 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
|
||||
import { BlockchainLifecycle, RPC, web3Factory } from '../src';
|
||||
import { BlockchainLifecycle, web3Factory } from '../src';
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
describe('BlockchainLifecycle tests', () => {
|
||||
const web3 = web3Factory.create();
|
||||
const web3Wrapper = new Web3Wrapper(web3.currentProvider);
|
||||
const rpc = new RPC();
|
||||
const blockchainLifecycle = new BlockchainLifecycle();
|
||||
const web3Provider = web3Factory.getRpcProvider();
|
||||
const web3Wrapper = new Web3Wrapper(web3Provider);
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
describe('#startAsync/revertAsync', () => {
|
||||
it('reverts changes in between', async () => {
|
||||
const blockNumberBefore = await web3Wrapper.getBlockNumberAsync();
|
||||
await blockchainLifecycle.startAsync();
|
||||
await rpc.mineBlockAsync();
|
||||
await web3Wrapper.mineBlockAsync();
|
||||
const blockNumberAfter = await web3Wrapper.getBlockNumberAsync();
|
||||
expect(blockNumberAfter).to.be.equal(blockNumberBefore + 1);
|
||||
await blockchainLifecycle.revertAsync();
|
||||
|
Reference in New Issue
Block a user