Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs
  • Loading branch information
SimenB committed May 6, 2018
commit 295038316291db9b0d1a36d2564d0ecef0132163
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

### Features

* `[jest-cli]` Add `--detectOpenHandles` flag which enables Jest to potentially
track down handles keeping it open after tests are complete.
([#6130](https://github.com/facebook/jest/pull/6130))
* `[jest-jasmine2]` Add data driven testing based on `jest-each`
([#6102](https://github.com/facebook/jest/pull/6102))
* `[jest-matcher-utils]` Change "suggest to equal" message to be more advisory
Expand Down
11 changes: 10 additions & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ output.

Print debugging info about your Jest config.

### `--detectOpenHandles`

Attempt to collect and print open handles preventing Jest from exiting cleanly.
Use this in cases where you need to use `--forceExit` in order for Jest to exit
to potentially track down the reason. Implemented using
[`why-is-node-running`](https://github.com/mafintosh/why-is-node-running), so it
only works in Node 8 and newer.

### `--env=<environment>`

The test environment used for all tests. This can point to any file or node
Expand All @@ -196,7 +204,8 @@ resources set up by test code cannot be adequately cleaned up. _Note: This
feature is an escape-hatch. If Jest doesn't exit at the end of a test run, it
means external resources are still being held on to or timers are still pending
in your code. It is advised to tear down external resources after each test to
make sure Jest can shut down cleanly._
make sure Jest can shut down cleanly. You can use `--detectOpenHandles` to help
track it down._

### `--help`

Expand Down