-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
SyntaxError: Identifier 'jest' has already been declared #1319
Comments
Can you provide the relevant code? |
See #1311 |
Great! thanks all working now! |
Could you clarify what was broken and how #1311 fixes this? |
@gaearon jest@18 tries to run the file scripts/test.js as a test. It is configured to look for test files in src/, which it now also matches to scr/* making it look in the scripts folder. |
Aaaah. Thanks for explaining. |
ghost
mentioned this issue
Mar 21, 2018
tyleryasaka
added a commit
to OriginProtocol/origin
that referenced
this issue
Apr 18, 2018
Before this was failing on jest errors. This fixes the script so that it doesn't fail. (There are still no tests.) We were getting this error: facebook/create-react-app#1319
4 tasks
tyleryasaka
added a commit
to OriginProtocol/origin
that referenced
this issue
May 3, 2018
Before this was failing on jest errors. This fixes the script so that it doesn't fail. (There are still no tests.) We were getting this error: facebook/create-react-app#1319
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.
Can you reproduce the problem with latest npm?
Yes after updating to the latest version the issue still occurs
###Can you still reproduce it?
Yes issue still occurs
Description
An issue with running test using jest
v18.0.0
Expected behavior
The declared variable within the
test.js
file would be the first instance, or the jest global variable to be available within thetest.js
Actual behavior
Error is logged, stating that
jest
has already been declaredEnvironment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected):node -v7.3.0
:npm -3.10.10
:Then, specify:
Reproducible Demo
To re-create the issue;
create-react-app
npm run eject
18.0.0
npm run test
The text was updated successfully, but these errors were encountered: