aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-27 00:01:54 +0800
committerFabio Berger <me@fabioberger.com>2017-05-27 00:01:54 +0800
commitd5feb5fc792c54bcf4a3a029ddc404e95a5df166 (patch)
tree92cafe86182dd65063a8182a730c6ecea7c61253 /test/utils
parentbadd4a98e9f604b81cff1d6d52086b63d500bd64 (diff)
downloaddexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar.gz
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar.bz2
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar.lz
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar.xz
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.tar.zst
dexon-sol-tools-d5feb5fc792c54bcf4a3a029ddc404e95a5df166.zip
rename BlockClean to BlockchainLifecycle and setupAsync to startAsync, restoreAsync to revertAsync
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/blockchain_lifecycle.ts (renamed from test/utils/blockchain_clean.ts)6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/utils/blockchain_clean.ts b/test/utils/blockchain_lifecycle.ts
index 18b7e3a5b..f7342b680 100644
--- a/test/utils/blockchain_clean.ts
+++ b/test/utils/blockchain_lifecycle.ts
@@ -1,16 +1,16 @@
import {RPC} from './rpc';
-export class BlockchainClean {
+export class BlockchainLifecycle {
private rpc: RPC;
private snapshotId: number;
constructor() {
this.rpc = new RPC();
}
// TODO: Check if running on TestRPC or on actual node, if actual node, re-deploy contracts instead
- public async setupAsync(): Promise<void> {
+ public async startAsync(): Promise<void> {
this.snapshotId = await this.rpc.takeSnapshotAsync();
}
- public async restoreAsync(): Promise<void> {
+ public async revertAsync(): Promise<void> {
const didRevert = await this.rpc.revertSnapshotAsync(this.snapshotId);
if (!didRevert) {
throw new Error(`Snapshot with id #${this.snapshotId} failed to revert`);