aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
Diffstat (limited to 'test/utils')
-rw-r--r--test/utils/blockchain_clean.ts4
-rw-r--r--test/utils/rpc.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/utils/blockchain_clean.ts b/test/utils/blockchain_clean.ts
index 6468dbec7..18b7e3a5b 100644
--- a/test/utils/blockchain_clean.ts
+++ b/test/utils/blockchain_clean.ts
@@ -7,10 +7,10 @@ export class BlockchainClean {
this.rpc = new RPC();
}
// TODO: Check if running on TestRPC or on actual node, if actual node, re-deploy contracts instead
- public async setupAsync() {
+ public async setupAsync(): Promise<void> {
this.snapshotId = await this.rpc.takeSnapshotAsync();
}
- public async restoreAsync() {
+ public async restoreAsync(): Promise<void> {
const didRevert = await this.rpc.revertSnapshotAsync(this.snapshotId);
if (!didRevert) {
throw new Error(`Snapshot with id #${this.snapshotId} failed to revert`);
diff --git a/test/utils/rpc.ts b/test/utils/rpc.ts
index b689a938c..e331fa6d4 100644
--- a/test/utils/rpc.ts
+++ b/test/utils/rpc.ts
@@ -26,7 +26,7 @@ export class RPC {
const didRevert = await this.sendAsync(payload);
return didRevert;
}
- private toPayload(method: string, params: any[] = []) {
+ private toPayload(method: string, params: any[] = []): string {
const payload = JSON.stringify({
id: this.id,
method,
@@ -35,7 +35,7 @@ export class RPC {
this.id += 1;
return payload;
}
- private async sendAsync(payload: string) {
+ private async sendAsync(payload: string): Promise<any> {
const opts = {
method: 'POST',
uri: `http://${this.host}:${this.port}`,