fix: harden error handling in lib/cli/run.js
#3313
Annotations
2 errors and 1 warning
Run All Node.js Tests
expected
{
output: '\n Exception during run: Error: invalid or unsupported TAP version: "nosuch"\n at createProducer (/home/runner/work/mocha/mocha/lib/reporters/tap.js:122:11)\n at new TAP (/home/runner/work/mocha/mocha/lib/reporters/tap.js:50:20)\n at Mocha.run (/home/runner/work/mocha/mocha/lib/mocha.js:984:18)\n at singleRun (/home/runner/work/mocha/mocha/lib/cli/run-helpers.js:126:16)\n at async exports.handler (/home/runner/work/mocha/mocha/lib/cli/run.js:370:5)\n',
code: 1,
args: [
'/home/runner/work/mocha/mocha/bin/mocha.js',
'--reporter=tap',
'--reporter-option',
'tapVersion=nosuch',
'/home/runner/work/mocha/mocha/test/integration/fixtures/reporters.fixture.js',
'--no-color',
'--no-bail',
'--no-parallel'
],
command: '/home/runner/work/mocha/mocha/bin/mocha.js --reporter=tap --reporter-option tapVersion=nosuch /home/runner/work/mocha/mocha/test/integration/fixtures/reporters.fixture.js --no-color --no-bail --no-parallel',
passing: 0, pending: 0, failing: 0
}
to satisfy
{
code: 1,
output: /^Error: invalid or unsupported TAP version: "nosuch"/m
}
{
output: '\n Exception during run: Error: invalid or unsupported TAP version: "nosuch"\n at createProducer (/home/runner/work/mocha/mocha/lib/reporters/tap.js:122:11)\n at new TAP (/home/runner/work/mocha/mocha/lib/reporters/tap.js:50:20)\n at Mocha.run (/home/runner/work/mocha/mocha/lib/mocha.js:984:18)\n at singleRun (/home/runner/work/mocha/mocha/lib/cli/run-helpers.js:126:16)\n at async exports.handler (/home/runner/work/mocha/mocha/lib/cli/run.js:370:5)\n', // should match /^Error: invalid or unsupported TAP version: "nosuch"/m
code: 1,
args: [
'/home/runner/work/mocha/mocha/bin/mocha.js',
'--reporter=tap',
'--reporter-option',
'tapVersion=nosuch',
'/home/runner/work/mocha/mocha/test/integration/fixtures/reporters.fixture.js',
'--no-color',
'--no-bail',
'--no-parallel'
],
command: '/home/runner/work/mocha/mocha/bin/mocha.js --reporter=tap --reporter-option tapVersion=nosuch /home/runner/work/mocha/mocha/test/integration/fixtures/reporters.fixture.js --no-color --no-bail --no-parallel',
passing: 0,
pending: 0,
failing: 0
}
|
Run All Node.js Tests
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The logs for this run have expired and are no longer available.
Loading