-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
Running yarn test
fails when integrating Sentry - SyntaxError: Unexpected token export at import *
#668
Comments
Google spit out this: https://jestjs.io/docs/en/tutorial-react-native#transformignorepatterns-customization It fixes it for me if I add this to "jest": {
"preset": "react-native",
"transformIgnorePatterns": [
"node_modules/(?!(react-native|react-native-cookies|@sentry/react-native)/)"
]
} |
i appreciate you investigating & responding despite it not being a Sentry issue, rather a Jest configuration for others who may encounter this - confirmed this does fix error message |
Thank god I found this post. |
The right config for Expo Sdk is
|
I fixed it by mocking Sentry in jest.setup.js: and adding jest.setup.js to jest.config.js:
|
Not working, any solution from above these😒 |
Please raise a new issue with more context in case something is not working. |
OS:
Platform:
SDK:
@sentry/react-native
react-native-sentry
react-native
version: 0.60.6Init Code:
I have following issue:
After setting up Sentry per the docs, running
yarn test
fails.More specifically, it fails after running Sentry Wizard. The following error occurs:
Steps to reproduce:
Here is a sample project demonstrating the issue along with STRs:
https://github.com/hkellaway/sentry-reactnative-yarntest-error-demo
Generally, the least you have to do to produce this error is to:
react-native
CLIyarn test
Actual result:
yarn test
fails after setting up Sentry for a React Native projectExpected result:
Integrating Sentry should not disrupt
yarn test
for React Native projectsThe text was updated successfully, but these errors were encountered: