Skip to content

Commit

Permalink
fix problem with karma tests by updating to karma-webpack v4
Browse files Browse the repository at this point in the history
  • Loading branch information
devlinjunker committed May 3, 2020
1 parent 97567e5 commit 2d91e99
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 158 deletions.
2 changes: 0 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const env = {
const webpack = buildWebpack(env);
webpack.watch = true;

console.log('TEST');

const karmaConfig = function(config) {
config.set({

Expand Down
180 changes: 33 additions & 147 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"karma-firefox-launcher": "^1.3.0",
"karma-mocha": "^1.3.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^3.0.5",
"karma-webpack": "^4.0.2",
"list-selectors": "^2.0.0",
"madge": "^3.8.0",
"mini-css-extract-plugin": "^0.9.0",
Expand Down
6 changes: 0 additions & 6 deletions test/test.bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ chai.use(sinonChai);
global.expect = chai.expect;
global.sandbox = sinon.createSandbox();

console.log('TEST');

// $FlowFixMe
const testsContext = require.context('../src', true, /.spec$/);

console.log('TEST');
console.log(testsContext);
console.log('\n\n\n TESTING');

testsContext.keys().forEach(testsContext);

/* eslint-disable mocha/no-top-level-hooks,mocha/no-hooks-for-single-case */
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ module.exports = (env) => {
{
test: /\.css$/,
use: [
// Q: Should we do this during development and then use mini-css-extract-plugin
// during production?
// {
// loader: 'style-loader',
// },
Expand Down Expand Up @@ -176,7 +178,5 @@ module.exports = (env) => {
});
}

console.log('TEST1');

return config;
};

0 comments on commit 2d91e99

Please sign in to comment.