From 117f010baa076f746b8081f7a62d4909c2653c67 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 22 Oct 2019 16:25:24 -0400 Subject: [PATCH] fix: fix race condition by using function synatx --- dapps/tests/app/test/simple_storage_spec.js | 4 +++- dapps/tests/app/test/token_spec.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dapps/tests/app/test/simple_storage_spec.js b/dapps/tests/app/test/simple_storage_spec.js index f66a3776b..d03df3d24 100644 --- a/dapps/tests/app/test/simple_storage_spec.js +++ b/dapps/tests/app/test/simple_storage_spec.js @@ -8,7 +8,9 @@ config({ deploy: { "SimpleStorage": { args: [100], - onDeploy: ["SimpleStorage.methods.setRegistar('$SimpleStorage').send()"] + onDeploy: (dependencies) => { + return dependencies.contracts.SimpleStorage.methods.setRegistar(dependencies.contracts.SimpleStorage.options.address).send(); + } } } } diff --git a/dapps/tests/app/test/token_spec.js b/dapps/tests/app/test/token_spec.js index 574ae502f..211006cdf 100644 --- a/dapps/tests/app/test/token_spec.js +++ b/dapps/tests/app/test/token_spec.js @@ -42,7 +42,9 @@ config({ } }, SomeContract: { - deployIf: "await MyToken.methods.isAvailable().call()", + deployIf: (dependencies) => { + return dependencies.contract.MyToken.methods.isAvailable().call(); + }, args: [ ["$MyToken2", "$SimpleStorage"], 100