mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-21 09:58:30 +00:00
fix(@contract-app): fix contracts app tests
This commit is contained in:
parent
183d9a05b5
commit
3c1c389e92
@ -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]);
|
||||
});
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user