Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: faster unit tests #36

Merged
merged 1 commit into from
Sep 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
let webpackConfig = require('./webpack.config.js');
//Need to remove externals otherwise they won't be included in test
delete webpackConfig.externals;
// Need to define inline source maps when using karma
webpackConfig.devtool = 'inline-source-map';

const isWindows = /^win/.test(process.platform);
const isMacOS = /^darwin/.test(process.platform);
// Create custom launcher in case running with Travis
Expand All @@ -28,7 +22,12 @@ module.exports = function (config) {
'test/setup/karma.js': ['webpack', 'sourcemap']
},
reporters: ['progress', 'coverage'],
webpack: webpackConfig,
webpack: {
...require('./webpack.config.js'),
externals: {}, //Need to remove externals otherwise they won't be included in test
devtool: 'inline-source-map', // Need to define inline source maps when using karma
mode: config.mode || 'development' // run in development mode by default to avoid minifying -> faster
},
webpackServer: {
noInfo: true
},
Expand Down