update tests

This commit is contained in:
Iuri Matias 2018-06-14 09:53:46 -04:00
parent 5a2cf62ee5
commit 86e1b115cc
1 changed files with 86 additions and 66 deletions

View File

@ -43,14 +43,15 @@ describe('embark.Contracts', function() {
compiler.compile_contracts(contractFiles, cb);
});
let contractsManager = new ContractsManager({
plugins: plugins,
contractFiles: [
readFile('test/contracts/simple_storage.sol'),
readFile('test/contracts/token.sol')
],
contractDirectories: ['app/contracts'],
contractsConfig: {
events.setCommandHandler("config:contractsConfig", function(cb) {
cb(contractsConfig);
});
events.setCommandHandler("config:contractsFiles", (cb) => {
cb([]);
});
let contractsConfig = {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
@ -77,7 +78,16 @@ describe('embark.Contracts', function() {
]
}
}
},
};
let contractsManager = new ContractsManager({
plugins: plugins,
contractFiles: [
readFile('test/contracts/simple_storage.sol'),
readFile('test/contracts/token.sol')
],
contractDirectories: ['app/contracts'],
contractsConfig: contractsConfig,
logger: new Logger({}),
events: events
});
@ -138,14 +148,15 @@ describe('embark.Contracts', function() {
compiler.compile_contracts(contractFiles, cb);
});
let contractsManager = new ContractsManager({
plugins: plugins,
contractFiles: [
readFile('test/contracts/simple_storage.sol'),
readFile('test/contracts/token_storage.sol')
],
contractDirectories: ['app/contracts'],
contractsConfig: {
events.setCommandHandler("config:contractsConfig", function(cb) {
cb(contractsConfig);
});
events.setCommandHandler("config:contractsFiles", (cb) => {
cb([]);
});
let contractsConfig = {
"versions": {
"web3.js": "1.0.0-beta",
"solc": "0.4.17"
@ -182,7 +193,16 @@ describe('embark.Contracts', function() {
"instanceOf": "SimpleStorage"
}
}
},
}
let contractsManager = new ContractsManager({
plugins: plugins,
contractFiles: [
readFile('test/contracts/simple_storage.sol'),
readFile('test/contracts/token_storage.sol')
],
contractDirectories: ['app/contracts'],
contractsConfig: contractsConfig,
logger: new Logger({}),
events: events
});