Skip to content

Commit

Permalink
Document slow tests on certain CI servers and/or Docker machines. (#2162
Browse files Browse the repository at this point in the history
)

* Document slow tests.

* Add "up to".
  • Loading branch information
mareksuscak authored and cpojer committed Nov 29, 2016
1 parent 2fcae4d commit 926c67e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ to `false`.

Also see [watchman troubleshooting](https://facebook.github.io/watchman/docs/troubleshooting.html).

### Tests are Extremely Slow on Docker and/or Continuous Integration server.

While Jest is most of the time extremely fast on modern multi-core computers
with fast SSDs, it may be slow on certain setups as our users [have](https://github.com/facebook/jest/issues/1395)
[discovered](https://github.com/facebook/jest/issues/1524#issuecomment-260246008).

Based on the [findings](https://github.com/facebook/jest/issues/1524#issuecomment-262366820),
one way to mitigate this issue and improve the speed by up to 50% is to run tests sequentially.

In order to do this you have to provide `--runInBand` switch like so:

```bash
# Using Jest CLI
jest --runInBand

# Using npm test (e.g. with create-react-app)
npm test -- --runInBand
```

### I'm using npm3 and my node_modules aren't properly loading.

Upgrade `jest-cli` to `0.9.0` or above.
Expand Down

0 comments on commit 926c67e

Please sign in to comment.