diff --git a/cmd/cmd_controller.js b/cmd/cmd_controller.js index 80884543d..2e05829ba 100644 --- a/cmd/cmd_controller.js +++ b/cmd/cmd_controller.js @@ -531,7 +531,8 @@ class EmbarkController { runTests(options) { this.context = [constants.contexts.test]; - let RunTests = require('../lib/tests/run_tests.js'); + // TODO Refactor to use an event + let RunTests = require('../lib/modules/tests/run_tests.js'); RunTests.run(options); } } diff --git a/lib/tests/reporter.js b/lib/modules/tests/reporter.js similarity index 100% rename from lib/tests/reporter.js rename to lib/modules/tests/reporter.js diff --git a/lib/tests/run_tests.js b/lib/modules/tests/run_tests.js similarity index 98% rename from lib/tests/run_tests.js rename to lib/modules/tests/run_tests.js index c3027bafb..94c66c4aa 100644 --- a/lib/tests/run_tests.js +++ b/lib/modules/tests/run_tests.js @@ -1,8 +1,8 @@ const async = require('async'); const Mocha = require('mocha'); const path = require('path'); -const {runCmd} = require('../utils/utils'); -const fs = require('../core/fs'); +const {runCmd} = require('../../utils/utils'); +const fs = require('../../core/fs'); const assert = require('assert'); const Test = require('./test'); const EmbarkSpec = require('./reporter'); diff --git a/lib/tests/solc_test.js b/lib/modules/tests/solc_test.js similarity index 99% rename from lib/tests/solc_test.js rename to lib/modules/tests/solc_test.js index f513f8273..1721dd935 100644 --- a/lib/tests/solc_test.js +++ b/lib/modules/tests/solc_test.js @@ -1,7 +1,7 @@ const Test = require('./test'); const async = require('async'); const fs = require('fs-extra'); -const File = require('./../core/file'); +const File = require('./../../core/file'); const remixTests = require('remix-tests'); const Base = require('mocha/lib/reporters/base'); const color = Base.color; diff --git a/lib/tests/test.js b/lib/modules/tests/test.js similarity index 98% rename from lib/tests/test.js rename to lib/modules/tests/test.js index d62aa0e8d..9ebcc39aa 100644 --- a/lib/tests/test.js +++ b/lib/modules/tests/test.js @@ -1,12 +1,12 @@ const async = require('async'); -const Engine = require('../core/engine.js'); +const Engine = require('../../core/engine.js'); const TestLogger = require('./test_logger.js'); const Web3 = require('web3'); -const Events = require('../core/events'); -const AccountParser = require('../utils/accountParser'); +const Events = require('../../core/events'); +const AccountParser = require('../../utils/accountParser'); // TODO: breaks module isolation; tests need to be refactored to use the engine and avoid this -const Provider = require('../modules/blockchain_connector/provider.js'); -const utils = require('../utils/utils'); +const Provider = require('../blockchain_connector/provider.js'); +const utils = require('../../utils/utils'); const EmbarkJS = require('embarkjs'); diff --git a/lib/tests/test_logger.js b/lib/modules/tests/test_logger.js similarity index 100% rename from lib/tests/test_logger.js rename to lib/modules/tests/test_logger.js