Skip to content

Commit

Permalink
(clean): remove --env=jsdom as JSDOM is Jest's default (#396)
Browse files Browse the repository at this point in the history
- the React template and docs for it had --env=jsdom explicitly set,
  but there's no need to do this, as Jest uses JSDOM by default already

- setting it a second time in CLI also overrides any custom configs
  • Loading branch information
agilgur5 authored and swyxio committed Dec 28, 2019
1 parent 27ba1dd commit 7c79b74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Examples
### `tsdx test`
This runs Jest v24.x in watch mode. See [https://jestjs.io](https://jestjs.io) for options. If you are using the React template, jest uses the flag `--env=jsdom` by default.
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:
Expand Down
2 changes: 1 addition & 1 deletion src/templates/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const reactTemplate: Template = {
},
scripts: {
...basicTemplate.packageJson.scripts,
test: 'tsdx test --env=jsdom --passWithNoTests',
test: 'tsdx test --passWithNoTests',
} as PackageJson['scripts'],
},
};
Expand Down

0 comments on commit 7c79b74

Please sign in to comment.