From d0e55c86076eb2d7a39ba5c1b7196528cfddc8d7 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 6 Aug 2019 15:15:06 -0400 Subject: [PATCH 1/2] tests run (more or less) --- packages/embark-console/package.json | 2 +- .../embark-contracts-manager/src/index.js | 3 +- packages/embark-coverage/package.json | 4 +- packages/embark-debugger/package.json | 2 +- packages/embark-deploy-tracker/package.json | 2 +- packages/embark-listener/package.json | 2 +- packages/embark-test-runner/package.json | 2 +- packages/embark-test-runner/src/index.js | 77 +++++-- packages/embark-test-runner/src/reporter.js | 2 +- packages/embark/package.json | 4 +- packages/embark/src/cmd/cmd_controller.js | 89 +++++++- packages/embark/src/lib/core/engine.js | 7 +- .../src/lib/modules/blockchain/index.js | 2 + packages/embark/src/lib/modules/geth/index.js | 1 + packages/embarkjs-ens/package.json | 2 +- packages/embarkjs-ipfs/package.json | 2 +- packages/embarkjs-swarm/package.json | 2 +- packages/embarkjs-web3/package.json | 2 +- packages/embarkjs-whisper/package.json | 2 +- packages/embarkjs/package.json | 2 +- yarn.lock | 193 ++++++++++++------ 21 files changed, 307 insertions(+), 97 deletions(-) diff --git a/packages/embark-console/package.json b/packages/embark-console/package.json index 0a2b4a5a4..af4b6dd6e 100644 --- a/packages/embark-console/package.json +++ b/packages/embark-console/package.json @@ -62,7 +62,7 @@ "cross-env": "5.2.0", "embark-logger": "^4.1.0-beta.5", "eslint": "5.7.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embark-contracts-manager/src/index.js b/packages/embark-contracts-manager/src/index.js index 51049ed0a..7921bdd33 100644 --- a/packages/embark-contracts-manager/src/index.js +++ b/packages/embark-contracts-manager/src/index.js @@ -50,7 +50,8 @@ class ContractsManager { }); console.dir("---- contracts manager---- ") - // this.registerCommands() + + // this.registerCommands() // this.registerAPIs() } diff --git a/packages/embark-coverage/package.json b/packages/embark-coverage/package.json index d55766693..05a4f24a2 100644 --- a/packages/embark-coverage/package.json +++ b/packages/embark-coverage/package.json @@ -55,12 +55,12 @@ "devDependencies": { "@babel/cli": "7.2.3", "@babel/core": "7.2.2", - "@types/mocha": "5.2.0", + "@types/mocha": "6.2.0", "@types/prettier": "1.16.4", "@types/web3": "1.0.12", "cross-env": "5.2.0", "eslint": "5.7.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "rimraf": "2.6.3", "tslint": "5.16.0", diff --git a/packages/embark-debugger/package.json b/packages/embark-debugger/package.json index 7a3804218..2e05d96c3 100644 --- a/packages/embark-debugger/package.json +++ b/packages/embark-debugger/package.json @@ -52,7 +52,7 @@ "@babel/cli": "7.2.3", "@babel/core": "7.2.2", "cross-env": "5.2.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embark-deploy-tracker/package.json b/packages/embark-deploy-tracker/package.json index 3f51d7b31..85d087824 100644 --- a/packages/embark-deploy-tracker/package.json +++ b/packages/embark-deploy-tracker/package.json @@ -53,7 +53,7 @@ }, "devDependencies": { "eslint": "5.7.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3" diff --git a/packages/embark-listener/package.json b/packages/embark-listener/package.json index 3f461fa8a..238ae61bb 100644 --- a/packages/embark-listener/package.json +++ b/packages/embark-listener/package.json @@ -51,7 +51,7 @@ }, "devDependencies": { "eslint": "5.7.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3" diff --git a/packages/embark-test-runner/package.json b/packages/embark-test-runner/package.json index 8e8b76e76..7f51b1820 100644 --- a/packages/embark-test-runner/package.json +++ b/packages/embark-test-runner/package.json @@ -51,7 +51,7 @@ "embark-i18n": "^4.1.0-beta.3", "embark-utils": "^4.1.0-beta.5", "fs-extra": "7.0.1", - "mocha": "5.2.0" + "mocha": "6.2.0" }, "devDependencies": { "@babel/cli": "7.2.3", diff --git a/packages/embark-test-runner/src/index.js b/packages/embark-test-runner/src/index.js index 184e7770a..4a364c078 100644 --- a/packages/embark-test-runner/src/index.js +++ b/packages/embark-test-runner/src/index.js @@ -9,6 +9,7 @@ const Test = require('./test'); const {EmbarkSpec, EmbarkApiSpec} = require('./reporter'); const SolcTest = require('./solc_test'); import { COVERAGE_GAS_LIMIT, GAS_LIMIT } from './constants'; +const Web3 = require('web3'); // TODO(andremedeiros): move to constants const TEST_TIMEOUT = 15000; // 15 seconds in milliseconds @@ -27,6 +28,7 @@ class TestRunner { this.run(options, callback); }); + /* this.events.setCommandHandler('tests:results:reset', () => { this.runResults = []; }); @@ -48,6 +50,7 @@ class TestRunner { this.run(options, () => res.send(this.runResults)); } ); + */ } run(options, cb) { @@ -88,7 +91,7 @@ class TestRunner { if (!options.solc && groups.jsFiles.length > 0) { fns.push((cb) => self.runJSTests(groups.jsFiles, options, cb)); } else if (options.solc && groups.solidityFiles.length > 0) { - fns.push((cb) => self.runJSTests(groups.solidityFiles, options, cb)); + fns.push((cb) => self.runSolidityTests(groups.solidityFiles, options, cb)); } if (fns.length === 0) { @@ -262,30 +265,76 @@ class TestRunner { } runJSTests(files, options, cb) { + const {events} = this.embark; + let compiledContracts; + let web3; + + const config = (cfg, acctCb) => { + global.before((done) => { + async.waterfall([ + (next) => events.request("contracts:build", cfg, compiledContracts, next), + (contractsList, contractDeps, next) => events.request("deployment:contracts:deploy", contractsList, contractDeps, next), + (next) => events.request("contracts:list", next), + (contracts, next) => { + for(const c of contracts) { + const instance = new web3.eth.Contract(c.abiDefinition, c.deployedAddress); + Object.setPrototypeOf(compiledContracts[c.className], instance); + } + next(); + } + ], (_err) => { + acctCb([]); + done(); + }); + }); + }; + async.waterfall([ - (next) => { // setup global namespace - global.assert = assert; + (next) => { // request provider + events.request("blockchain:client:provider", "ethereum", next);; + }, + (bcProvider, next) => { // set provider + web3 = new Web3(bcProvider); next(); }, - (next) => { // override require + (next) => { // get contract files + console.log('getting contract files'); + events.request("config:contractsFiles", next); + }, + (cf, next) => { // compile contracts + console.log('compiling contracts'); + events.request("compiler:contracts:compile", cf, next); + }, + (cc, next) => { // override require + compiledContracts = cc; + + const Module = require("module"); + const originalRequire = require("module").prototype.require; + Module.prototype.require = function(req) { + const prefix = "Embark/contracts/"; + if (!req.startsWith(prefix)) { + return originalRequire.apply(this, arguments); + } + + return cc[req.replace(prefix, "")]; + }; + next(); + }, + (next) => { // setup global namespace + global.assert = assert; + global.config = config; next(); }, (next) => { // initialize Mocha const mocha = new Mocha(); - mocha.delay(); // stops test execution from automatically starting mocha.suite.timeout(TEST_TIMEOUT); + files.forEach(f => mocha.addFile(f)); - next(null, mocha); + mocha.run((failures) => { + next(null, failures); + }); }, - (mocha, next) => { // register test files - files.forEach(file => mocha.addFile(file)); - next(null, mocha); - }, - (mocha, next) => { - //mocha.options.delay = false; - mocha.run(failures => next(null, failures)); - } ], (err, failures) => { cb(err, failures); }); diff --git a/packages/embark-test-runner/src/reporter.js b/packages/embark-test-runner/src/reporter.js index 60cb03edc..d1d63704e 100644 --- a/packages/embark-test-runner/src/reporter.js +++ b/packages/embark-test-runner/src/reporter.js @@ -1,5 +1,5 @@ const Base = require('mocha/lib/reporters/base'); -const ms = require('mocha/lib/ms'); +//const ms = require('mocha/lib/ms'); const color = Base.color; import { getAddressToContract, getTransactionParams } from 'embark-utils'; diff --git a/packages/embark/package.json b/packages/embark/package.json index 502b75ad0..e64685ab0 100644 --- a/packages/embark/package.json +++ b/packages/embark/package.json @@ -160,7 +160,7 @@ "json-parse-better-errors": "1.0.2", "live-plugin-manager-git-fix": "0.12.1", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "neo-blessed": "0.2.0", "netcat": "1.3.5", "node-http-proxy-json": "0.1.6", @@ -236,7 +236,7 @@ "embark-test-contract-0": "0.0.2", "embark-test-contract-1": "0.0.1", "eslint": "5.7.0", - "mocha-sinon": "1.2.0", + "mocha-sinon": "2.1.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rejected-or-not": "1.0.1", diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index 90c5fce4f..b67099acf 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -186,6 +186,7 @@ class EmbarkController { let plugin = engine.plugins.createPlugin('cmdcontrollerplugin', {}); plugin.registerActionForEvent("embark:engine:started", async (_params, cb) => { + console.dir(engine.config.blockchainConfig); await engine.events.request2("blockchain:node:start", engine.config.blockchainConfig, cb); }); plugin.registerActionForEvent("embark:engine:started", async (_params, cb) => { @@ -861,13 +862,14 @@ class EmbarkController { } runTests(options) { + console.dir(options); this.context = [constants.contexts.test]; const Engine = require('../lib/core/engine.js'); const engine = new Engine({ - // TODO: we should NOT use env, it's here because it's being used somewhere deep in the code - // but we should/need to remove it as it's causing unexpected behaviour - env: options.env, + // TODO: this should not be necessary + env: "development", + //env: options.env, client: options.client, locale: options.locale, version: this.version, @@ -875,12 +877,90 @@ class EmbarkController { logFile: options.logFile, logLevel: options.logLevel || Logger.logLevels.warn, context: this.context, - useDashboard: options.useDashboard, + useDashboard: false, webpackConfigName: options.webpackConfigName, ipcRole: 'client', interceptLogs: false }); + async.waterfall([ + function initEngine(next) { + engine.init({}, next); + }, + function loadPlugins(next) { + let pluginList = engine.plugins.listPlugins(); + if (pluginList.length > 0) { + engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", ")); + } + + engine.registerModuleGroup("coreComponents"); + engine.registerModuleGroup("blockchain"); + engine.registerModuleGroup("compiler"); + engine.registerModuleGroup("contracts"); + engine.registerModuleGroup("pipeline"); + engine.registerModuleGroup("tests"); + + let plugin = engine.plugins.createPlugin('cmdcontrollerplugin', {}); + plugin.registerActionForEvent("embark:engine:started", async (_params, cb) => { + console.dir(engine.config.blockchainConfig); + await engine.events.request2("blockchain:node:start", engine.config.blockchainConfig, cb); + }); + + engine.startEngine(() => { + next(); + }); + }, + function setupTestEnvironment(next) { + engine.events.request2('tests:run', options, next); + } + ], (err) => { + process.exit(err ? 1 : 0); + }); + + + + + + /* + + console.log('going to start things now'); + async.waterfall([ + function initializeEngine(next) { // initialize engine + }, + function loadPlugins(next) { // load plugins, start services + let pluginList = engine.plugins.listPlugins(); + if (pluginList.length > 0) { + engine.logger.info(__("loaded plugins") + ": " + pluginList.join(", ")); + } + + engine.registerModuleGroup("coreComponents"); + engine.registerModuleGroup("blockchain"); + engine.registerModuleGroup("compiler"); + engine.registerModuleGroup("contracts"); + engine.registerModuleGroup("pipeline"); + next(); + }, + function startBlockchainNode(next) { // start blockchain + let plugin = engine.plugins.createPlugin('cmdcontrollerplugin', {}); + plugin.registerActionForEvent("embark:engine:started", (_params, cb) => { + console.log('engine started, starting blockchain'); + engine.events.request2("blockchain:node:start", engine.config.blockchainConfig, () => { + cb(); + }); + }); + }, + function startEngine(next) { // start engine + engine.startEngine(next); + }, + function runSuite(next) { // run tests + console.log('running tests'); + engine.events.request('tests:run', options, next); + }, + ], (err) => { + console.log("OMG ERROR", err); + }); + + /* async.waterfall([ function initEngine(next) { engine.init({}, next); @@ -916,6 +996,7 @@ class EmbarkController { process.exit(err ? 1 : 0); }); + */ } } diff --git a/packages/embark/src/lib/core/engine.js b/packages/embark/src/lib/core/engine.js index 9acd2921c..021998742 100644 --- a/packages/embark/src/lib/core/engine.js +++ b/packages/embark/src/lib/core/engine.js @@ -85,7 +85,8 @@ class Engine { "webserver": this.webserverService, "storage": this.storageComponent, "communication": this.communicationComponents, - "filewatcher": this.filewatcherService + "filewatcher": this.filewatcherService, + "tests": this.testComponents }; let group = groups[groupName]; @@ -175,6 +176,10 @@ class Engine { }) } + testComponents() { + this.registerModulePackage('embark-test-runner'); + } + compilerComponents(options) { // TODO: should be moved (they are plugins) this.registerModulePackage('embark-solidity', {ipc: this.ipc, useDashboard: this.useDashboard}); diff --git a/packages/embark/src/lib/modules/blockchain/index.js b/packages/embark/src/lib/modules/blockchain/index.js index 902780046..05128830e 100644 --- a/packages/embark/src/lib/modules/blockchain/index.js +++ b/packages/embark/src/lib/modules/blockchain/index.js @@ -22,8 +22,10 @@ class Blockchain { // const clientName = this.blockchainConfig.client; const client = this.blockchainNodes[clientName]; if (!client) return cb("client " + clientName + " not found"); + console.log('starting', clientName, 'blockchain client'); let onStart = () => { + console.log("blockchain onStart being called"); this.events.emit("blockchain:started", clientName); cb(); } diff --git a/packages/embark/src/lib/modules/geth/index.js b/packages/embark/src/lib/modules/geth/index.js index 05ed3a412..6bcc3d86d 100644 --- a/packages/embark/src/lib/modules/geth/index.js +++ b/packages/embark/src/lib/modules/geth/index.js @@ -54,6 +54,7 @@ class Geth { } startBlockchainNode(callback) { + console.log('startBlockchainNode'); this.blockchainProcess = new BlockchainProcessLauncher({ events: this.events, logger: this.logger, diff --git a/packages/embarkjs-ens/package.json b/packages/embarkjs-ens/package.json index c571f0f29..78d6049a5 100644 --- a/packages/embarkjs-ens/package.json +++ b/packages/embarkjs-ens/package.json @@ -62,7 +62,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "rimraf": "2.6.3", "source-map-support": "0.5.9" diff --git a/packages/embarkjs-ipfs/package.json b/packages/embarkjs-ipfs/package.json index 19fae45a6..9b5d9bb32 100644 --- a/packages/embarkjs-ipfs/package.json +++ b/packages/embarkjs-ipfs/package.json @@ -60,7 +60,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embarkjs-swarm/package.json b/packages/embarkjs-swarm/package.json index 3e45d92cd..2fbb7b16e 100644 --- a/packages/embarkjs-swarm/package.json +++ b/packages/embarkjs-swarm/package.json @@ -60,7 +60,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embarkjs-web3/package.json b/packages/embarkjs-web3/package.json index 311dc175f..f324dba9e 100644 --- a/packages/embarkjs-web3/package.json +++ b/packages/embarkjs-web3/package.json @@ -60,7 +60,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embarkjs-whisper/package.json b/packages/embarkjs-whisper/package.json index b7042e085..d99c52d95 100644 --- a/packages/embarkjs-whisper/package.json +++ b/packages/embarkjs-whisper/package.json @@ -61,7 +61,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/packages/embarkjs/package.json b/packages/embarkjs/package.json index a46eb8392..ba86603b6 100644 --- a/packages/embarkjs/package.json +++ b/packages/embarkjs/package.json @@ -68,7 +68,7 @@ "chai": "4.2.0", "cross-env": "5.2.0", "lodash.clonedeep": "4.5.0", - "mocha": "5.2.0", + "mocha": "6.2.0", "npm-run-all": "4.1.5", "nyc": "13.1.0", "rimraf": "2.6.3", diff --git a/yarn.lock b/yarn.lock index 3b52da8cc..778e7e796 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2830,10 +2830,10 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/mocha@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.0.tgz#b3c8e69f038835db1a7fdc0b3d879fc50506e29e" - integrity sha512-YeDiSEzznwZwwp766SJ6QlrTyBYUGPSIwmREHVTmktUYiT/WADdWtpt9iH0KuUSf8lZLdI4lP0X6PBzPo5//JQ== +"@types/mocha@6.2.0": + version "5.2.7" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea" + integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== "@types/node-fetch@^1.6.8": version "1.6.9" @@ -3505,7 +3505,7 @@ ansi-color@^0.2.1: resolved "https://registry.yarnpkg.com/ansi-color/-/ansi-color-0.2.1.tgz#3e75c037475217544ed763a8db5709fa9ae5bf9a" integrity sha1-PnXAN0dSF1RO12Oo21cJ+prlv5o= -ansi-colors@^3.0.0: +ansi-colors@3.2.3, ansi-colors@^3.0.0: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== @@ -5636,11 +5636,6 @@ comma-separated-tokens@^1.0.0: dependencies: trim "0.0.1" -commander@2.15.1: - version "2.15.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" - integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== - commander@2.17.x, commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -6466,7 +6461,7 @@ debug@3.1.0, debug@=3.1.0: dependencies: ms "2.0.0" -debug@^3.0.1, debug@^3.1.0: +debug@3.2.6, debug@^3.0.1, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== @@ -8373,6 +8368,13 @@ flat-cache@^1.2.1: rimraf "~2.6.2" write "^0.2.1" +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + flatmap@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/flatmap/-/flatmap-0.0.3.tgz#1f18a4d938152d495965f9c958d923ab2dd669b4" @@ -8718,6 +8720,11 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" @@ -8863,18 +8870,6 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.3, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@~7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -9313,12 +9308,7 @@ hdkey@^1.1.0: safe-buffer "^5.1.1" secp256k1 "^3.0.1" -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - -he@1.2.x, he@^1.1.1: +he@1.2.0, he@1.2.x, he@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -10074,7 +10064,7 @@ is-buffer@^1.0.2, is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.0: +is-buffer@^2.0.0, is-buffer@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.3.tgz#4ecf3fcf749cbd1e472689e109ac66261a25e725" integrity sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw== @@ -11024,6 +11014,14 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= +js-yaml@3.13.1, js-yaml@^3.13.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" @@ -11040,14 +11038,6 @@ js-yaml@^3.11.0: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.13.0: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -11770,7 +11760,7 @@ log-driver@^1.2.7: resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg== -log-symbols@^2.2.0: +log-symbols@2.2.0, log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== @@ -12379,27 +12369,39 @@ mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0 dependencies: minimist "0.0.8" -mocha-sinon@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mocha-sinon/-/mocha-sinon-1.2.0.tgz#95f034a8dade4da966a0f3afc89c126d8b589123" - integrity sha1-lfA0qNreTalmoPOvyJwSbYtYkSM= +mocha-sinon@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mocha-sinon/-/mocha-sinon-2.1.0.tgz#61e92727e577bee44cac6f32162dcec33c1301e5" + integrity sha512-E+rqBhoCQlvo+Kn9SY9qvoO/TWqJFnmxG70dyVYdFc6LGZAq08dr+pV2yUP4sBeMMYGYABB8T7NHNsG+4scy/A== -mocha@5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" - integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== +mocha@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.0.tgz#f896b642843445d1bb8bca60eabd9206b8916e56" + integrity sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ== dependencies: + ansi-colors "3.2.3" browser-stdout "1.3.1" - commander "2.15.1" - debug "3.1.0" + debug "3.2.6" diff "3.5.0" escape-string-regexp "1.0.5" - glob "7.1.2" + find-up "3.0.0" + glob "7.1.3" growl "1.10.5" - he "1.1.1" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "2.2.0" minimatch "3.0.4" mkdirp "0.5.1" - supports-color "5.4.0" + ms "2.1.1" + node-environment-flags "1.0.5" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.2.2" + yargs-parser "13.0.0" + yargs-unparser "1.5.0" mock-fs@^4.1.0: version "4.7.0" @@ -12674,6 +12676,14 @@ node-dir@^0.1.10: dependencies: minimatch "^3.0.2" +node-environment-flags@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" + integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + node-fetch-npm@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" @@ -13164,7 +13174,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: +object.assign@4.1.0, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -13388,6 +13398,15 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + os-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.0.0.tgz#e1434dbfddb8e74b44c98b56797d951b7648a5d9" @@ -16080,6 +16099,11 @@ require-main-filename@^1.0.1: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -16493,6 +16517,11 @@ semaphore@>=1.0.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" + integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -17407,7 +17436,7 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -17446,10 +17475,10 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -supports-color@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" - integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== dependencies: has-flag "^3.0.0" @@ -19599,14 +19628,14 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1, which@^1.1.1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: +which@1, which@1.3.1, which@^1.1.1, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== @@ -20009,6 +20038,14 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== +yargs-parser@13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.0.0.tgz#3fc44f3e76a8bdb1cc3602e860108602e5ccde8b" + integrity sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -20024,6 +20061,14 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^13.0.0: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" @@ -20053,6 +20098,15 @@ yargs-parser@^9.0.2: dependencies: camelcase "^4.1.0" +yargs-unparser@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.5.0.tgz#f2bb2a7e83cbc87bb95c8e572828a06c9add6e0d" + integrity sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw== + dependencies: + flat "^4.1.0" + lodash "^4.17.11" + yargs "^12.0.5" + yargs@11.1.0, yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" @@ -20089,6 +20143,23 @@ yargs@12.0.2: y18n "^3.2.1 || ^4.0.0" yargs-parser "^10.1.0" +yargs@13.2.2: + version "13.2.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.2.tgz#0c101f580ae95cea7f39d927e7770e3fdc97f993" + integrity sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA== + dependencies: + cliui "^4.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.0.0" + yargs@^10.0.3: version "10.1.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" @@ -20107,7 +20178,7 @@ yargs@^10.0.3: y18n "^3.2.1" yargs-parser "^8.1.0" -yargs@^12.0.0, yargs@^12.0.1: +yargs@^12.0.0, yargs@^12.0.1, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== From 8029f1d0e5443acd9cef219608ea269edfcba226 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 7 Aug 2019 11:41:18 -0400 Subject: [PATCH 2/2] add stack components to tests --- packages/embark/src/cmd/cmd_controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/embark/src/cmd/cmd_controller.js b/packages/embark/src/cmd/cmd_controller.js index b67099acf..ad6a9f3c3 100644 --- a/packages/embark/src/cmd/cmd_controller.js +++ b/packages/embark/src/cmd/cmd_controller.js @@ -894,6 +894,8 @@ class EmbarkController { } engine.registerModuleGroup("coreComponents"); + engine.registerModuleGroup("stackComponents"); + engine.registerModuleGroup("blockchain"); engine.registerModuleGroup("compiler"); engine.registerModuleGroup("contracts");