diff --git a/test/unit/browser/index.js b/test/unit/browser/index.js index 5084f654f2962..41c52405e7364 100644 --- a/test/unit/browser/index.js +++ b/test/unit/browser/index.js @@ -24,9 +24,9 @@ const { randomBytes } = require('crypto'); // opts const defaultReporterName = process.platform === 'win32' ? 'list' : 'spec'; const optimist = require('optimist') - // .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('build', 'run with build output (out-build)').boolean('build') .describe('run', 'only run tests matching ').string('run') + .describe('glob', 'only run tests matching ').string('glob') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('debug', 'do not run browsers headless').alias('debug', ['debug-browser']).boolean('debug') .describe('sequential', 'only run suites for a single browser at a time').boolean('sequential') @@ -88,7 +88,7 @@ const testModules = (async function () { } else { // glob patterns (--glob) const defaultGlob = '**/*.test.js'; - const pattern = argv.run || defaultGlob; + const pattern = (argv.glob || defaultGlob).replace(new RegExp(`^(${out}|src)/`), '').replace(/\.ts$/, '.js'); isDefaultModules = pattern === defaultGlob; promise = new Promise((resolve, reject) => { diff --git a/test/unit/browser/renderer.html b/test/unit/browser/renderer.html index ae6786964832c..517d9a58abb06 100644 --- a/test/unit/browser/renderer.html +++ b/test/unit/browser/renderer.html @@ -40,28 +40,38 @@ }); - - - -