updatests; include options

This commit is contained in:
Iuri Matias 2017-12-22 13:07:43 -05:00
parent 16afb4e405
commit cd0fd94386
6 changed files with 20 additions and 7 deletions

View File

@ -43,6 +43,10 @@ module.exports = {
//global.Embark = require("../index.js");
//global.EmbarkSpec = global.Embark.initTests();
let configOptions = {};
global.config = function(config) {
configOptions = config;
};
// TODO: check how to pass the options
//global.EmbarkSpec = new Test(options);
global.EmbarkSpec = new Test({});
@ -66,11 +70,19 @@ module.exports = {
//global.EmbarkSpec = global.Embark.initTests();
// TODO: check how to pass the options
//global.EmbarkSpec = new Test(options);
global.EmbarkSpec = new Test({});
//global.config = function(config) {
// console.log("running config!");
// console.log(config.hello);
// configOptions = config;
//};
//console.log("---------");
//console.log(configOptions);
//console.log("---------");
global.EmbarkSpec = new Test({simulatorOptions: configOptions});
global.web3 = global.EmbarkSpec.web3;
//global.contract = Mocha.describe;
});
}
};

View File

@ -92,7 +92,8 @@ Test.prototype.deployAll = function(contractsConfig, cb) {
}
self.web3.eth.defaultAccount = accounts[0];
RunCode.doEval(result, self.web3); // jshint ignore:line
cb();
//cb();
cb(accounts);
});
});
};

View File

@ -28,7 +28,7 @@
"commander": "^2.8.1",
"css-loader": "^0.28.7",
"ejs": "^2.5.7",
"ethereumjs-testrpc": "3.9.2",
"ethereumjs-testrpc": "^6.0.3",
"file-loader": "^1.1.5",
"finalhandler": "^0.5.0",
"follow-redirects": "^1.2.4",

View File

@ -20,7 +20,7 @@ contract("AnotherStorage", function() {
args: [2000]
}
};
EmbarkSpec.deployAll(contractsConfig, done);
EmbarkSpec.deployAll(contractsConfig, () => { done() });
});
it("set SimpleStorage address", function(done) {

View File

@ -6,7 +6,7 @@ describe("SimpleStorage", function() {
args: [100]
}
};
EmbarkSpec.deployAll(contractsConfig, done);
EmbarkSpec.deployAll(contractsConfig, () => { done() });
});
it("should set constructor value", function(done) {

View File

@ -29,7 +29,7 @@ describe("Token", function() {
]
}
};
EmbarkSpec.deployAll(contractsConfig, done);
EmbarkSpec.deployAll(contractsConfig, () => { done() });
});
it("not deploy Token", function(done) {