fix(@contract-app): fix contracts app tests

This commit is contained in:
Jonathan Rainville 2019-10-22 14:55:51 -04:00
parent 183d9a05b5
commit 3c1c389e92
3 changed files with 10 additions and 4 deletions

View File

@ -13,8 +13,11 @@ config({
"SimpleStorage": {
args: [100]
},
// "AnotherStorage": {
// args: ["$SimpleStorage", "embark.eth"]
// },
"AnotherStorage": {
args: ["$SimpleStorage", "embark.eth"]
args: ["$SimpleStorage", "$SimpleStorage"]
}
}
}
@ -30,7 +33,8 @@ contract("AnotherStorage", function() {
assert.equal(result.toString(), SimpleStorage.options.address);
});
it("set ENS address", async function() {
// FIXME add back when the ENS feature is back
xit("set ENS address", async function() {
const result = await AnotherStorage.methods.ens().call();
assert.equal(result.toString(), accounts[0]);
});

View File

@ -21,7 +21,9 @@ contract("SimpleStorage", function () {
});
it("set storage value", async function () {
await SimpleStorage.methods.set(150).send();
const toSend = SimpleStorage.methods.set(150);
const gas = await toSend.estimateGas();
await toSend.send({gas});
let result = await SimpleStorage.methods.get().call();
assert.strictEqual(parseInt(result, 10), 499650);
});

View File

@ -53,7 +53,7 @@ class TestRunner {
async.waterfall([
(next) => {
this.events.request("config:contractsConfig:set", Object.assign(this.configObj.contractsConfig, {explicit: true}), next);
this.events.request("config:contractsConfig:set", Object.assign(this.configObj.contractsConfig, {explicit: true, afterDeploy: null, beforeDeploy: null}), next);
},
(next) => {
this.getFilesFromDir(testPath, next);