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

docs: Statement about NODE_ENV wrong #7369

Closed
lukas-zech-software opened this issue Nov 15, 2018 · 3 comments · Fixed by #7387
Closed

docs: Statement about NODE_ENV wrong #7369

lukas-zech-software opened this issue Nov 15, 2018 · 3 comments · Fixed by #7387

Comments

@lukas-zech-software
Copy link
Contributor

🐛 Bug Report

The Using Babel section in Getting started states:

keep in mind that Jest will automatically define NODE_ENV as test

Which is not completely true, as it only sets process.env.NODE_ENV to true if it was not defined before which is a small but significant difference which caused a huge issue in our project

To Reproduce

See https://github.com/facebook/jest/blame/2af1c62750917d31b9d3b5d31ae2db8d3316414c/docs/GettingStarted.md#L110

Expected behaviour

Documentation should clearly state, that process.env.NODE_ENV is only set to test if it was not set before

@SimenB
Copy link
Member

SimenB commented Nov 15, 2018

Wanna send a PR for that?

@rickhanlonii
Copy link
Member

How about

Keep in mind that Jest will automatically define NODE_ENV as test if not already set

lukas-zech-software added a commit to lukas-zech-software/jest that referenced this issue Nov 19, 2018
lukas-zech-software added a commit to lukas-zech-software/jest that referenced this issue Nov 19, 2018
lukas-zech-software added a commit to lukas-zech-software/jest that referenced this issue Nov 19, 2018
lukas-zech-software added a commit to lukas-zech-software/jest that referenced this issue Nov 22, 2018
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants