diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-13 07:11:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 07:11:45 +0800 |
commit | 6daf70b745b561f9a767886e2b40891da7ebc184 (patch) | |
tree | 63cfebd8e95b3dc15a8f593ffa105a9b3bf6412e /test/utils | |
parent | abb23631df4fd775d2f9c96332e16c0732b2955e (diff) | |
parent | 12298ea392525ed1de87115003e7d89267489c88 (diff) | |
download | dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar.gz dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar.bz2 dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar.lz dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar.xz dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.tar.zst dexon-sol-tools-6daf70b745b561f9a767886e2b40891da7ebc184.zip |
Merge pull request #207 from 0xProject/orderWatcherTests
Additional order watcher tests
Diffstat (limited to 'test/utils')
-rw-r--r-- | test/utils/blockchain_lifecycle.ts | 3 | ||||
-rw-r--r-- | test/utils/rpc.ts | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/utils/blockchain_lifecycle.ts b/test/utils/blockchain_lifecycle.ts index 9fdf0e856..9a44ccd6f 100644 --- a/test/utils/blockchain_lifecycle.ts +++ b/test/utils/blockchain_lifecycle.ts @@ -20,4 +20,7 @@ export class BlockchainLifecycle { throw new Error(`Snapshot with id #${snapshotId} failed to revert`); } } + public async mineABlock(): Promise<void> { + await this.rpc.mineBlockAsync(); + } } diff --git a/test/utils/rpc.ts b/test/utils/rpc.ts index f28a85340..299e72e79 100644 --- a/test/utils/rpc.ts +++ b/test/utils/rpc.ts @@ -26,6 +26,12 @@ export class RPC { const didRevert = await this.sendAsync(payload); return didRevert; } + public async mineBlockAsync(): Promise<void> { + const method = 'evm_mine'; + const params: any[] = []; + const payload = this.toPayload(method, params); + await this.sendAsync(payload); + } private toPayload(method: string, params: any[] = []): string { const payload = JSON.stringify({ id: this.id, |