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