Skip to content

Commit

Permalink
Revert "default jest watch unless in CI" PR #366 (#421)
Browse files Browse the repository at this point in the history
* revert "default jest watch unless in CI" PR

revert "default jest watch unless in CI" PR

* document reverting CI=true on tsdx test
  • Loading branch information
swyxio authored and jaredpalmer committed Jan 13, 2020
1 parent f1cf8b1 commit 95ac3f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,16 +452,14 @@ Examples
### `tsdx test`
This runs Jest v24.x in watch mode. See [https://jestjs.io](https://jestjs.io) for options.
If you would like to disable watch mode, you can set the environment variable `CI=true`. For instance, you could set up your `package.json` `scripts` like:
This runs Jest v24.x. See [https://jestjs.io](https://jestjs.io) for options. For example, if you would like to run in watch mode, you can run `tsdx test --watch`. So you could set up your `package.json` `scripts` like:
```json
{
"scripts": {
"test": "CI=true tsdx test",
"test:watch": "tsdx test",
"test:coverage": "CI=true tsdx test --coverage"
"test": "tsdx test",
"test:watch": "tsdx test --watch",
"test:coverage": "tsdx test --coverage"
}
}
```
Expand Down
4 changes: 0 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,6 @@ prog
})
);

if (!process.env.CI) {
argv.push('--watch'); // run jest in watch mode unless in CI
}

const [, ...argsToPassToJestCli] = argv;
jest.run(argsToPassToJestCli);
});
Expand Down

0 comments on commit 95ac3f4

Please sign in to comment.