diff --git a/lib/modules/solidity/solcP.js b/lib/modules/solidity/solcP.js index a5c19577d..2d5383243 100644 --- a/lib/modules/solidity/solcP.js +++ b/lib/modules/solidity/solcP.js @@ -51,7 +51,7 @@ process.on('message', function (msg) { if (msg.action === 'compile') { solcProcess.compile(msg.jsonObj, (output) => { - process.send({result: "compilation", output: output}); + process.send({result: "compilation-" + msg.id, output: output}); }); } }); diff --git a/lib/modules/solidity/solcW.js b/lib/modules/solidity/solcW.js index 5dd794b01..f13d2490b 100644 --- a/lib/modules/solidity/solcW.js +++ b/lib/modules/solidity/solcW.js @@ -2,6 +2,7 @@ let utils = require('../../utils/utils.js'); let fs = require('../../core/fs.js'); let currentSolcVersion = require('../../../package.json').dependencies.solc; const ProcessLauncher = require('../../process/processLauncher'); +const uuid = require('uuid/v1'); class SolcW { @@ -49,11 +50,12 @@ class SolcW { } compile(jsonObj, done) { - this.solcProcess.once('result', 'compilation', (msg) => { + const id = uuid(); + this.solcProcess.once('result', 'compilation-' + id, (msg) => { done(JSON.parse(msg.output)); }); - this.solcProcess.send({action: 'compile', jsonObj: jsonObj}); + this.solcProcess.send({action: 'compile', jsonObj: jsonObj, id}); } } diff --git a/lib/tests/run_tests.js b/lib/tests/run_tests.js index 0ea591b17..b12361ef5 100644 --- a/lib/tests/run_tests.js +++ b/lib/tests/run_tests.js @@ -53,7 +53,7 @@ module.exports = { // TODO: this global here might not be necessary at all global.web3 = global.embark.web3; - mocha.suite.beforeAll('Wait for deploy', (done) => { + mocha.suite.beforeEach('Wait for deploy', (done) => { test.onReady(() => { done(); }); diff --git a/lib/tests/test_logger.js b/lib/tests/test_logger.js index bdbb1c5fc..b96b9a0f3 100644 --- a/lib/tests/test_logger.js +++ b/lib/tests/test_logger.js @@ -11,7 +11,7 @@ class TestLogger { logFunction() { this.logs.push(arguments); - console.log(...arguments); + // console.log(...arguments); } contractsState() { diff --git a/package-lock.json b/package-lock.json index 08562add3..8b444fe9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.2.tgz", "integrity": "sha512-Q3FWsbdmkQd1ib11A4XNWQvRD//5KpPoGawA8aB2DR7pWKoW9XQv3+dGxD/Z1eVFze23Okdo27ZQytVFlweKvQ==", "requires": { - "@types/node": "10.1.2" + "@types/node": "10.1.4" } }, "@types/lockfile": { @@ -59,16 +59,16 @@ "integrity": "sha512-pD6JuijPmrfi84qF3/TzGQ7zi0QIX+d7ZdetD6jUA6cp+IsCzAquXZfi5viesew+pfpOTIdAVKuh1SHA7KeKzg==" }, "@types/node": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.1.2.tgz", - "integrity": "sha512-bjk1RIeZBCe/WukrFToIVegOf91Pebr8cXYBwLBIsfiGWVQ+ifwWsT59H3RxrWzWrzd1l/Amk1/ioY5Fq3/bpA==" + "version": "10.1.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.1.4.tgz", + "integrity": "sha512-GpQxofkdlHYxjHad98UUdNoMO7JrmzQZoAaghtNg14Gwg7YkohcrCoJEcEMSgllx4VIZ+mYw7ZHjfaeIagP/rg==" }, "@types/node-fetch": { "version": "1.6.9", "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-1.6.9.tgz", "integrity": "sha512-n2r6WLoY7+uuPT7pnEtKJCmPUGyJ+cbyBR8Avnu4+m1nzz7DwBVuyIvvlBzCZ/nrpC7rIgb3D6pNavL7rFEa9g==", "requires": { - "@types/node": "10.1.2" + "@types/node": "10.1.4" } }, "@types/semver": { @@ -81,7 +81,7 @@ "resolved": "https://registry.npmjs.org/@types/tar/-/tar-4.0.0.tgz", "integrity": "sha512-YybbEHNngcHlIWVCYsoj7Oo1JU9JqONuAlt1LlTH/lmL8BMhbzdFUgReY87a05rY1j8mfK47Del+TCkaLAXwLw==", "requires": { - "@types/node": "10.1.2" + "@types/node": "10.1.4" } }, "@types/url-join": {