Skip to content

theneva/jest-process-exit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

process.exit() from user code breaks test run

If the user code called in a test runs process.exit(<code>), Jest's behaviour depends on:

  • whether one or multiple test files are run
  • the order(?) in which the tests are executed

Demos

Just the exiting test

Just the passing test:

Both, where the exiting test simply exits

Both, where the exiting test causes the run to hang (having changed only the name of the passing test file)

With the diff from #6714 applied:

Notes

  • Running Jest with --runInBand makes the runner always exit immediately after process.exit(1) is called.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors