Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default testEnvironment to 'node' #282

Merged
merged 1 commit into from
Feb 14, 2022
Merged

Set default testEnvironment to 'node' #282

merged 1 commit into from
Feb 14, 2022

Conversation

VolkerSchiewe
Copy link
Contributor

First of all: create library, very nice to use!

We are using mongoose in our tests and where always wondering why it was printing the warning Mongoose: looks like you're trying to test a Mongoose app with Jest's default jsdom test environment. while this library sets the testEnvironment to node. Now I found that the testEnvironment in the config is not actually used, because it is overwritten by the code in test.js.
Hence this pull request 😊

@VolkerSchiewe
Copy link
Contributor Author

I just noticed that it is possible to get around this problem, because the implementation is based on 'create react app': adding the flag --env=node. In any case I think changing the default behaviour makes sense because this is what most people will expect from this library.

@jayair jayair added bug Something isn't working enhancement New feature or request labels Feb 14, 2022
@jayair
Copy link
Member

jayair commented Feb 14, 2022

Ah good catch. Thanks for the PR!

@jayair jayair removed the enhancement New feature or request label Feb 14, 2022
@jayair jayair merged commit 951f0ab into AnomalyInnovations:master Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants