Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuklis committed Dec 3, 2022
1 parent 32a6468 commit 65564e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 12 additions & 0 deletions lib/commands/test/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ function karmaCommand(argv) {
};
const webpackConfig = stripes.getStripesWebpackConfig(platform.getStripesConfig(), webpackConfigOptions, context);

// This fixes the warnings similar to:
// WARNING in ./node_modules/mocha/mocha-es2018.js 18541:26-55
// Critical dependency: the request of a dependency is an expression
// https://github.com/mochajs/mocha/issues/2448#issuecomment-355222358
webpackConfig.module.exprContextCritical = false;

// This fixes warning:
// WARNING in DefinePlugin
// Conflicting values for 'process.env.NODE_ENV'
// https://webpack.js.org/configuration/mode/#usage
webpackConfig.mode = 'none';

const karmaService = new KarmaService(context.cwd);
karmaService.runKarmaTests(webpackConfig, Object.assign({}, argv.karma, { watch: argv.watch, cache: argv.cache }));
}
Expand Down
12 changes: 0 additions & 12 deletions lib/test/karma-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,6 @@ module.exports = class KarmaService {
return karmaConfig;
}

// This fixes the warnings similar to:
// WARNING in ./node_modules/mocha/mocha-es2018.js 18541:26-55
// Critical dependency: the request of a dependency is an expression
// https://github.com/mochajs/mocha/issues/2448#issuecomment-355222358
webpackConfig.module.exprContextCritical = false;

// This fixes warning:
// WARNING in DefinePlugin
// Conflicting values for 'process.env.NODE_ENV'
// https://webpack.js.org/configuration/mode/#usage
webpackConfig.mode = 'none';

// Runs the specified integration tests
runKarmaTests(webpackConfig, karmaOptions) {
const karmaConfig = this.generateKarmaConfig(webpackConfig, karmaOptions);
Expand Down

0 comments on commit 65564e6

Please sign in to comment.