-
Notifications
You must be signed in to change notification settings - Fork 567
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
chore(dependency): update jest #301
Conversation
Pick what you need and try adding the below to your {
"jest": {
"moduleFileExtensions": [
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"json5",
"web.jsx",
"jsx",
"node"
]
}
} |
Thank you @crunchbar, but I am still getting the issue. No new errors, it didn't seem to have any effect. |
Ok I think I figured it out. It had to do with my old .babelrc file. I updated to |
LGTM! |
package.json
Outdated
} | ||
}, | ||
"transformIgnorePatterns": [ | ||
"^.+\\.json?$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean "^.+\\.json$"
without the question mark?
The question mark makes the n
optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I made the change below and removed transformIgnorePatterns completely and it works! 👍
package.json
Outdated
@@ -65,7 +65,10 @@ | |||
"transform": { | |||
"^.+\\.json5?$": "json5-jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you just want to target json5
here, you can remove the question mark ?
. By doing so, you wouldn't need to specify the transformIgnorePatterns
below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made that change, thank you!
Issue #, if available:
Description of changes: This will fail, but creating the PR to see tests fail in Travis
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.