diff --git a/contracts/test-utils/src/mocha_blockchain.ts b/contracts/test-utils/src/mocha_blockchain.ts index 68263c834a..8dc00b5c42 100644 --- a/contracts/test-utils/src/mocha_blockchain.ts +++ b/contracts/test-utils/src/mocha_blockchain.ts @@ -80,7 +80,18 @@ function defineBlockchainSuite( describeCall: Mocha.ContextDefinitionCallback, ): T { return describeCall(description, function(this: Mocha.ISuiteCallbackContext): void { - callback.call(this, BlockchainTestsEnvironment.create()); + const env = BlockchainTestsEnvironment.create(); + before( + async (): Promise => { + return env.blockchainLifecycle.startAsync(); + }, + ); + before( + async (): Promise => { + return env.blockchainLifecycle.revertAsync(); + }, + ); + callback.call(this, env); }); } diff --git a/contracts/test-utils/test/mocha_blockchain.ts b/contracts/test-utils/test/mocha_blockchain.ts index 2f291781b1..e4c2f35038 100644 --- a/contracts/test-utils/test/mocha_blockchain.ts +++ b/contracts/test-utils/test/mocha_blockchain.ts @@ -29,7 +29,7 @@ blockchainTests('mocha blockchain extensions', env => { }); }); - blockchainTests/*.only*/('only', () => { + blockchainTests('only', () => { it.skip("can't test `only` :-(", () => { // no-op. });