(clean): remove --env=jsdom as JSDOM is Jest's default #396
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Docs seemed to be introduced in 4296413 and template in #68 . This seems to have matched the templating of CRA v1, but this was changed in CRA v2. I'm guessing CRA may have defaulted to
node
under-the-hood in v1 but I'm not really sure (did not investigate history any further).tsdx
seemed to never default tonode
, so seems like it was always redundant intsdx
.There's a separate question of whether to use
node
test environment in the default template, but a non-React library may still be a browser-based library, and therefore might still want to usejsdom
.I think using
node
is an optimization/option that should be left to the user; setting it tonode
by default would probably cause more confusion than optimization (and it may not shave off much time, if any, based on my experience at least).