Skip to content

Commit

Permalink
feat: add support for force exit (#1)
Browse files Browse the repository at this point in the history
* feat: add support for force exit

* fix: break
  • Loading branch information
sparten11740 authored Jul 10, 2024
1 parent df9fecc commit 68f0ac5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ function parseOptions() {
case '--write-snapshots':
options.writeSnapshots = true
break
case '--test-force-exit':
case '--forceExit':
options.forceExit = true
break
default:
throw new Error(`Unknown option: ${option}`)
}
Expand Down Expand Up @@ -111,6 +115,11 @@ if (options.writeSnapshots) {
args.push('--test-update-snapshots')
}

if (options.forceExit) {
assert((major === 20 && minor > 13) || major >= 22, 'For forceExit, use Node.js >= 20.14.0')
args.push('--test-force-exit')
}

if (options.coverage) {
if (options.coverageEngine === 'node') {
args.push('--experimental-test-coverage')
Expand Down

0 comments on commit 68f0ac5

Please sign in to comment.