From df04a56a1774b53a9b59ab8ee59020a54b1fd558 Mon Sep 17 00:00:00 2001 From: John Reilly Date: Tue, 8 Jan 2019 14:01:18 +0000 Subject: [PATCH] release event not available so use push event and filter (#893) * release event not available so use push event and filter * use @master in place of @1.0.0 * check for a new tag last * Try using docker://zenika/alpine-chrome:with-node Need chrome to run tests * Can use yarn * Just run execution tests * Use node 10 docker image and run all tests * Comment tests until they are dockerised * Run execution tests again * Don't install pnpm globally * Use npx to run pnpm * Run Chrome no sandbox * More --no-sandbox * create own dockerfile with node / chrome headless * common karma.conf.js using ChromeHeadless --no-sandbox * no sandbox on command line * use alpine-chrome:with-node docker image * back to the version that works * drop node 6 from travis * try using node:10-slim * start building and running in docker * use full node image instead of slim for comparison tests * set GITHUB_WORKSPACE = "/github/workspace/ts-loader" * close to being able to run comparison tests in docker container * left a stray * tests pass in docker * can comparison tests pass in a GitHub Action? * comparison tests will not pass in github action * add docker:build step to package.json * Exclude npm publishing until https://github.com/actions/bin/issues/13 is fixed * Update main.workflow --- .dockerignore | 6 ++ .github/main.workflow | 26 +++++--- .github/node-chrome/Dockerfile | 19 ++++++ .travis.yml | 1 - Dockerfile | 34 ++++++++++ package.json | 6 +- .../create-and-execute-test.js | 6 +- .../1.8.2_allowJs-entryFileIsJs/karma.conf.js | 49 +++----------- .../karma.conf.js | 52 ++++----------- .../2.0.3_typesResolution/karma.conf.js | 52 ++++----------- .../karma.conf.js | 51 ++++---------- .../2.1.4_babel-es2016/karma.conf.js | 50 ++++---------- .../2.1.4_babel-react/karma.conf.js | 51 ++++---------- .../execution-tests/2.1.4_react/karma.conf.js | 51 ++++---------- .../karma.conf.js | 51 ++++---------- .../2.4.1_importCodeSplitting/karma.conf.js | 51 ++++---------- .../2.4.1_nodeResolutionAllowJs/karma.conf.js | 52 ++++----------- .../3.0.1_projectReferences/karma.conf.js | 50 ++++---------- .../3.0.1_resolveJsonModule/karma.conf.js | 52 ++++----------- .../3.0.1_resolveModuleName/karma.conf.js | 52 ++++----------- .../allowTsInNodeModules/karma.conf.js | 52 ++++----------- .../babel-codeSplitting/karma.conf.js | 52 ++++----------- .../babel-es2015/karma.conf.js | 52 ++++----------- .../babel-es6resolveParent/karma.conf.js | 52 ++++----------- .../basic-happypack/karma.conf.js | 66 +++++++------------ test/execution-tests/basic/karma.conf.js | 52 ++++----------- .../nodeResolution/karma.conf.js | 52 ++++----------- .../option-context/karma.conf.js | 51 ++++---------- test/execution-tests/run-tests.js | 6 +- .../simpleDependency/karma.conf.js | 52 ++++----------- test/karmaConfig.js | 51 ++++++++++++++ test/reporterOptions.js | 8 --- 32 files changed, 390 insertions(+), 918 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/node-chrome/Dockerfile create mode 100644 Dockerfile create mode 100644 test/karmaConfig.js delete mode 100644 test/reporterOptions.js diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a3eb6da9f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.git +.github +.vscode +.test +node_modules +examples diff --git a/.github/main.workflow b/.github/main.workflow index 98d4d0bad..397120d8c 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -1,6 +1,7 @@ workflow "build, test and publish on release" { - on = "release" - resolves = "publish" + on = "push" +# resolves = "publish" - commented until this issue is resolved: https://github.com/actions/bin/issues/13 + resolves = "check for new tag" } # install with yarn @@ -21,15 +22,22 @@ action "build" { # test with yarn action "test" { needs = "build" - uses = "actions/npm@1.0.0" + uses = "./.github/node-chrome" runs = "yarn" - args = "test" + args = "execution-tests" } -# publish with npm -action "publish" { +# filter for a new tag +action "check for new tag" { needs = "test" - uses = "actions/npm@1.0.0" - args = "publish" - secrets = ["NPM_AUTH_TOKEN"] + uses = "actions/bin/filter@master" + args = "tag" } + +# publish with npm - commented until this issue is resolved: https://github.com/actions/bin/issues/13 +#action "publish" { +# needs = "check for new tag" +# uses = "actions/npm@1.0.0" +# args = "publish" +# secrets = ["NPM_AUTH_TOKEN"] +#} diff --git a/.github/node-chrome/Dockerfile b/.github/node-chrome/Dockerfile new file mode 100644 index 000000000..654aa4479 --- /dev/null +++ b/.github/node-chrome/Dockerfile @@ -0,0 +1,19 @@ +# Taken from https://raw.githubusercontent.com/filipesilva/ng-github-actions/master/.github/node-chrome/Dockerfile +# and https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#running-puppeteer-in-docker +FROM node:10 + +# See https://crbug.com/795759 +RUN apt-get update && apt-get install -yq libgconf-2-4 + +# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) +# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer +# installs, work. +RUN apt-get update && apt-get install -y wget --no-install-recommends \ + && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ + && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ + && apt-get update \ + && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get purge --auto-remove -y curl \ + && rm -rf /src/*.deb diff --git a/.travis.yml b/.travis.yml index 52929afdd..9838be98b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ addons: chrome: stable language: node_js node_js: - - "6" - "8" - "10" sudo: required diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..f929cb1cd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +FROM node:10 + +# See https://crbug.com/795759 +RUN apt-get update && apt-get install -yq libgconf-2-4 + +# Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others) +# Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteer +# installs, work. +RUN apt-get update && apt-get install -y wget --no-install-recommends \ + && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ + && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ + && apt-get update \ + && apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && apt-get purge --auto-remove -y curl \ + && rm -rf /src/*.deb + +WORKDIR /TypeStrong/ts-loader + +# install packages +COPY package.json yarn.lock index.js /TypeStrong/ts-loader/ +RUN yarn + +# build +COPY src /TypeStrong/ts-loader/src +RUN yarn build + +# test +COPY test /TypeStrong/ts-loader/test + +# build and run tests with: +# docker build -t ts-loader . +# docker run -it ts-loader yarn test diff --git a/package.json b/package.json index 2b6dd9747..9c55e97e1 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,10 @@ "lint": "tslint --project \"./src\"", "comparison-tests": "tsc --project \"./test/comparison-tests\" && npm link ./test/comparison-tests/testLib && node test/comparison-tests/run-tests.js", "comparison-tests-generate": "node test/comparison-tests/stub-new-version.js", - "execution-tests": "npm i -g pnpm && node test/execution-tests/run-tests.js", - "test": "node test/run-tests.js" + "execution-tests": "node test/execution-tests/run-tests.js", + "test": "node test/run-tests.js", + "docker:build": "docker build -t ts-loader .", + "postdocker:build": "docker run -it ts-loader yarn test" }, "husky": { "hooks": { diff --git a/test/comparison-tests/create-and-execute-test.js b/test/comparison-tests/create-and-execute-test.js index 8ad3114ba..03b4f3f78 100644 --- a/test/comparison-tests/create-and-execute-test.js +++ b/test/comparison-tests/create-and-execute-test.js @@ -416,7 +416,7 @@ function getNormalisedFileContent(file, location) { return 'at ' + remainingPathAndColon + 'irrelevant-line-number' + colon + 'irrelevant-column-number'; }) // strip C:/projects/ts-loader/.test/ - .replace(/(C\:\/)?[\w|\/]*\/ts-loader\/\.test/g, '') + .replace(/(C\:\/)?[\w|\/]*\/(ts-loader|workspace)\/\.test/g, '') .replace(/webpack:\/\/(C:\/)?[\w|\/|-]*\/comparison-tests\//g, 'webpack://comparison-tests/') .replace(/WEBPACK FOOTER\/n\/ (C:\/)?[\w|\/|-]*\/comparison-tests\//g, 'WEBPACK FOOTER/n/ /ts-loader/test/comparison-tests/') .replace(/!\** (C\:\/)?[\w|\/|-]*\/comparison-tests\//g, '!*** /ts-loader/test/comparison-tests/') @@ -440,9 +440,9 @@ function normaliseString(platformSpecificContent) { .replace(new RegExp(regexEscape('\\'), 'g'), '/') .replace(new RegExp(regexEscape('//'), 'g'), '/') // replace C:/source/ts-loader/index.js or /home/travis/build/TypeStrong/ts-loader/index.js with ts-loader - .replace(/ \S+[\/|\\]ts-loader[\/|\\]index.js/g, 'ts-loader') + .replace(/ \S+[\/|\\](ts-loader|workspace)[\/|\\]index.js/g, 'ts-loader') // replace (C:/source/ts-loader/dist/index.js with (ts-loader) - .replace(/\(\S+[\/|\\]ts-loader[\/|\\]dist[\/|\\]index.js:\d*:\d*\)/g, '(ts-loader)'); + .replace(/\(\S+[\/|\\](ts-loader|workspace)[\/|\\]dist[\/|\\]index.js:\d*:\d*\)/g, '(ts-loader)'); } /** diff --git a/test/execution-tests/1.8.2_allowJs-entryFileIsJs/karma.conf.js b/test/execution-tests/1.8.2_allowJs-entryFileIsJs/karma.conf.js index 1171a0cb4..21e1a1ada 100644 --- a/test/execution-tests/1.8.2_allowJs-entryFileIsJs/karma.conf.js +++ b/test/execution-tests/1.8.2_allowJs-entryFileIsJs/karma.conf.js @@ -1,47 +1,14 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - './**/*.tests.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - './**/*.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions, - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: ['./**/*.tests.js'] + }) + ); }; diff --git a/test/execution-tests/1.8.2_babel-allowSyntheticDefaultImports/karma.conf.js b/test/execution-tests/1.8.2_babel-allowSyntheticDefaultImports/karma.conf.js index 3b2022de7..a38a197f0 100644 --- a/test/execution-tests/1.8.2_babel-allowSyntheticDefaultImports/karma.conf.js +++ b/test/execution-tests/1.8.2_babel-allowSyntheticDefaultImports/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place from babel and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions, - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.0.3_typesResolution/karma.conf.js b/test/execution-tests/2.0.3_typesResolution/karma.conf.js index eb9f24b0e..a38a197f0 100644 --- a/test/execution-tests/2.0.3_typesResolution/karma.conf.js +++ b/test/execution-tests/2.0.3_typesResolution/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.1.4_babel-allowJsImportTypes/karma.conf.js b/test/execution-tests/2.1.4_babel-allowJsImportTypes/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/2.1.4_babel-allowJsImportTypes/karma.conf.js +++ b/test/execution-tests/2.1.4_babel-allowJsImportTypes/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.1.4_babel-es2016/karma.conf.js b/test/execution-tests/2.1.4_babel-es2016/karma.conf.js index f9f53b52e..a38a197f0 100644 --- a/test/execution-tests/2.1.4_babel-es2016/karma.conf.js +++ b/test/execution-tests/2.1.4_babel-es2016/karma.conf.js @@ -1,45 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place from babel and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions, - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.1.4_babel-react/karma.conf.js b/test/execution-tests/2.1.4_babel-react/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/2.1.4_babel-react/karma.conf.js +++ b/test/execution-tests/2.1.4_babel-react/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.1.4_react/karma.conf.js b/test/execution-tests/2.1.4_react/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/2.1.4_react/karma.conf.js +++ b/test/execution-tests/2.1.4_react/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.4.1_babel-importCodeSplitting/karma.conf.js b/test/execution-tests/2.4.1_babel-importCodeSplitting/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/2.4.1_babel-importCodeSplitting/karma.conf.js +++ b/test/execution-tests/2.4.1_babel-importCodeSplitting/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.4.1_importCodeSplitting/karma.conf.js b/test/execution-tests/2.4.1_importCodeSplitting/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/2.4.1_importCodeSplitting/karma.conf.js +++ b/test/execution-tests/2.4.1_importCodeSplitting/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/2.4.1_nodeResolutionAllowJs/karma.conf.js b/test/execution-tests/2.4.1_nodeResolutionAllowJs/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/2.4.1_nodeResolutionAllowJs/karma.conf.js +++ b/test/execution-tests/2.4.1_nodeResolutionAllowJs/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/3.0.1_projectReferences/karma.conf.js b/test/execution-tests/3.0.1_projectReferences/karma.conf.js index 926196284..a38a197f0 100644 --- a/test/execution-tests/3.0.1_projectReferences/karma.conf.js +++ b/test/execution-tests/3.0.1_projectReferences/karma.conf.js @@ -1,45 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/3.0.1_resolveJsonModule/karma.conf.js b/test/execution-tests/3.0.1_resolveJsonModule/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/3.0.1_resolveJsonModule/karma.conf.js +++ b/test/execution-tests/3.0.1_resolveJsonModule/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/3.0.1_resolveModuleName/karma.conf.js b/test/execution-tests/3.0.1_resolveModuleName/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/3.0.1_resolveModuleName/karma.conf.js +++ b/test/execution-tests/3.0.1_resolveModuleName/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/allowTsInNodeModules/karma.conf.js b/test/execution-tests/allowTsInNodeModules/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/allowTsInNodeModules/karma.conf.js +++ b/test/execution-tests/allowTsInNodeModules/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/babel-codeSplitting/karma.conf.js b/test/execution-tests/babel-codeSplitting/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/babel-codeSplitting/karma.conf.js +++ b/test/execution-tests/babel-codeSplitting/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/babel-es2015/karma.conf.js b/test/execution-tests/babel-es2015/karma.conf.js index 914175018..a38a197f0 100644 --- a/test/execution-tests/babel-es2015/karma.conf.js +++ b/test/execution-tests/babel-es2015/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place from babel and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/babel-es6resolveParent/karma.conf.js b/test/execution-tests/babel-es6resolveParent/karma.conf.js index 914175018..a38a197f0 100644 --- a/test/execution-tests/babel-es6resolveParent/karma.conf.js +++ b/test/execution-tests/babel-es6resolveParent/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place from babel and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/basic-happypack/karma.conf.js b/test/execution-tests/basic-happypack/karma.conf.js index bc6b3fe0f..101d16921 100644 --- a/test/execution-tests/basic-happypack/karma.conf.js +++ b/test/execution-tests/basic-happypack/karma.conf.js @@ -1,48 +1,32 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - plugins: webpackConfig.plugins, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true + config.set( + Object.assign( + {}, + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }), + { + webpack: { + devtool: 'inline-source-map', + mode: webpackConfig.mode, + module: webpackConfig.module, + resolve: webpackConfig.resolve, + plugins: webpackConfig.plugins, + + // for test harness purposes only, you would not need this in a normal project + resolveLoader: webpackConfig.resolveLoader + } } - }, - - // reporter options - mochaReporter: reporterOptions - }); + ) + ); }; diff --git a/test/execution-tests/basic/karma.conf.js b/test/execution-tests/basic/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/basic/karma.conf.js +++ b/test/execution-tests/basic/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/nodeResolution/karma.conf.js b/test/execution-tests/nodeResolution/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/nodeResolution/karma.conf.js +++ b/test/execution-tests/nodeResolution/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/option-context/karma.conf.js b/test/execution-tests/option-context/karma.conf.js index 303de7b97..a38a197f0 100644 --- a/test/execution-tests/option-context/karma.conf.js +++ b/test/execution-tests/option-context/karma.conf.js @@ -1,46 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - // Documentation: https://karma-runner.github.io/0.13/config/configuration-file.html - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This ensures we have the es6 shims in place and then loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/execution-tests/run-tests.js b/test/execution-tests/run-tests.js index afdcfcac9..0a10d4b4c 100644 --- a/test/execution-tests/run-tests.js +++ b/test/execution-tests/run-tests.js @@ -105,8 +105,8 @@ function runTests(testName) { var karmaConfPath = path.join(testPath, 'karma.conf.js'); if (pathExists(path.join(testPath, 'shrinkwrap.yaml'))) { - console.log('pnpm install into ' + testPath); - execSync('pnpm install', { cwd: testPath, stdio: 'inherit' }); + console.log('npx pnpm install into ' + testPath); + execSync('npx pnpm install --force', { cwd: testPath, stdio: 'inherit' }); } else if (pathExists(path.join(testPath, 'package.json'))) { console.log('yarn install into ' + testPath); execSync('yarn install', { cwd: testPath, stdio: 'inherit' }); @@ -115,7 +115,7 @@ function runTests(testName) { try { if (pathExists(path.join(testPath, 'karma.conf.js'))) { var singleRunOrWatch = watch ? '' : ' --single-run'; - execSync('karma start --reporters mocha' + singleRunOrWatch + ' --browsers ChromeHeadless', { cwd: testPath, stdio: 'inherit' }); + execSync('karma start --reporters mocha' + singleRunOrWatch + ' --browsers ChromeHeadlessNoSandbox', { cwd: testPath, stdio: 'inherit' }); passingTests.push(testName); } else { diff --git a/test/execution-tests/simpleDependency/karma.conf.js b/test/execution-tests/simpleDependency/karma.conf.js index f0cb98bc7..a38a197f0 100644 --- a/test/execution-tests/simpleDependency/karma.conf.js +++ b/test/execution-tests/simpleDependency/karma.conf.js @@ -1,47 +1,17 @@ /* eslint-disable no-var, strict */ 'use strict'; -var path = require('path'); -var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); -var reporterOptions = require('../../reporterOptions'); +var makeKarmaConfig = require('../../karmaConfig'); module.exports = function(config) { - config.set({ - browsers: [ 'ChromeHeadless' ], - - files: [ - // This loads all the tests - 'main.js' - ], - - port: 9876, - - frameworks: [ 'jasmine' ], - - logLevel: config.LOG_INFO, //config.LOG_DEBUG - - preprocessors: { - 'main.js': [ 'webpack', 'sourcemap' ] - }, - - webpack: { - devtool: 'inline-source-map', - mode: webpackConfig.mode, - module: webpackConfig.module, - resolve: webpackConfig.resolve, - - // for test harness purposes only, you would not need this in a normal project - resolveLoader: webpackConfig.resolveLoader - }, - - webpackMiddleware: { - quiet: true, - stats: { - colors: true - } - }, - - // reporter options - mochaReporter: reporterOptions - }); + config.set( + makeKarmaConfig({ + config, + webpackConfig, + files: [ + // This ensures we have the es6 shims in place from babel and then loads all the tests + 'main.js' + ] + }) + ); }; diff --git a/test/karmaConfig.js b/test/karmaConfig.js new file mode 100644 index 000000000..1daf5d53a --- /dev/null +++ b/test/karmaConfig.js @@ -0,0 +1,51 @@ +module.exports = function makeKarmaConfig({ config, webpackConfig, files }) { + return { + browsers: ['ChromeHeadlessNoSandbox'], + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + } + }, + + // This loads all the tests + files, + + port: 9876, + + frameworks: ['jasmine'], + + logLevel: config.LOG_INFO, //config.LOG_DEBUG + + preprocessors: { + './**/*.js': ['webpack', 'sourcemap'] + }, + + webpack: { + devtool: 'inline-source-map', + mode: webpackConfig.mode, + module: webpackConfig.module, + resolve: webpackConfig.resolve, + + // for test harness purposes only, you would not need this in a normal project + resolveLoader: webpackConfig.resolveLoader + }, + + webpackMiddleware: { + quiet: true, + stats: { + colors: true + } + }, + + // reporter options + mochaReporter: { + colors: { + success: 'green', + info: 'cyan', + warning: 'bgBlue', + error: 'bgRed' + } + } + }; +}; diff --git a/test/reporterOptions.js b/test/reporterOptions.js deleted file mode 100644 index 76d9f14b4..000000000 --- a/test/reporterOptions.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - colors: { - success: 'green', - info: 'cyan', - warning: 'bgBlue', - error: 'bgRed' - } -}; \ No newline at end of file