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

chore(dependency): update jest #301

Merged
merged 3 commits into from
Aug 14, 2019
Merged

chore(dependency): update jest #301

merged 3 commits into from
Aug 14, 2019

Conversation

dbanksdesign
Copy link
Member

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.

@crunchbar
Copy link

Pick what you need and try adding the below to your package.json

{
  "jest": {
    "moduleFileExtensions": [
      "web.js",
      "js",
      "web.ts",
      "ts",
      "web.tsx",
      "tsx",
      "json",
      "json5",
      "web.jsx",
      "jsx",
      "node"
    ]
  }
}

@dbanksdesign
Copy link
Member Author

Thank you @crunchbar, but I am still getting the issue. No new errors, it didn't seem to have any effect.

@dbanksdesign
Copy link
Member Author

Ok I think I figured it out. It had to do with my old .babelrc file. I updated to @babel/preset-env

@chazzmoney
Copy link
Collaborator

LGTM! :shipit:

package.json Outdated
}
},
"transformIgnorePatterns": [
"^.+\\.json?$"

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.

Copy link
Member Author

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",

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.

Copy link
Member Author

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!

@chazzmoney chazzmoney merged commit c7e09f2 into master Aug 14, 2019
@chazzmoney chazzmoney deleted the updating-jest branch August 14, 2019 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants