@exodus/test 1.0.0-rc.101 → 1.0.0-rc.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +6 -1
- package/package.json +1 -1
package/bin/index.js
CHANGED
|
@@ -97,6 +97,7 @@ function parseOptions() {
|
|
|
97
97
|
require: [],
|
|
98
98
|
testNamePattern: [],
|
|
99
99
|
testTimeout: undefined,
|
|
100
|
+
reporter: undefined,
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
const args = [...process.argv]
|
|
@@ -239,6 +240,10 @@ function parseOptions() {
|
|
|
239
240
|
case '--testTimeout':
|
|
240
241
|
options.testTimeout = Number(args.shift())
|
|
241
242
|
break
|
|
243
|
+
case '--reporter':
|
|
244
|
+
case '--test-reporter':
|
|
245
|
+
options.reporter = String(args.shift())
|
|
246
|
+
break
|
|
242
247
|
default:
|
|
243
248
|
throw new Error(`Unknown option: ${option}`)
|
|
244
249
|
}
|
|
@@ -304,7 +309,7 @@ if (options.pure) {
|
|
|
304
309
|
assert(options.testNamePattern.length === 0, '--test-name-pattern requires node:test engine now')
|
|
305
310
|
// eslint-disable-next-line unicorn/prefer-switch
|
|
306
311
|
} else if (options.engine === 'node:test' || options.engine === 'electron-as-node:test') {
|
|
307
|
-
const reporter = import.meta.resolve('./reporter.js')
|
|
312
|
+
const reporter = options.reporter ?? import.meta.resolve('./reporter.js')
|
|
308
313
|
args.push('--test', '--no-warnings=ExperimentalWarning', '--test-reporter', reporter)
|
|
309
314
|
|
|
310
315
|
if (have.haveSnapshots && engineOptions.haveIsOk) args.push('--experimental-test-snapshots')
|