]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Don't require --grep to be given on the command line (#9768)
authorJosh Kelley <joshkel@gmail.com>
Thu, 14 Oct 2021 12:35:29 +0000 (08:35 -0400)
committerGitHub <noreply@github.com>
Thu, 14 Oct 2021 12:35:29 +0000 (08:35 -0400)
This makes it easier to use the `karma` CLI directly, if desired, and makes it easier to use WebStorm's integrated debugger (which makes up `karma` command-line invocations itself).  Prior to this change, if `--grep` isn't given, Karma looks for `*undefined*.js` and finds no tests to run.

karma.conf.js

index a9eba037f2c8840cba7bf1f500e6eaab68c2a3ad..3a93f07eb9a3c87eb6dfd30a9f29937463a346fc 100644 (file)
@@ -10,7 +10,7 @@ module.exports = function(karma) {
     .option('verbose', {default: false})
     .argv;
 
-  const grep = args.grep === true ? '' : args.grep;
+  const grep = (args.grep === true || args.grep === undefined) ? '' : args.grep;
   const specPattern = 'test/specs/**/*' + grep + '*.js';
 
   // Use the same rollup config as our dist files: when debugging (npm run dev),