Please provide the following:
- SDK Version: 35
- Platforms(Android/iOS/web/all): All
Since I updated to SDK 35 I’m getting Jest errors:
Jest encountered an unexpected token
/Users/theboi/develop/togethr/node_modules/@sentry/react-native/dist/js/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export { Severity, Status } from "@sentry/types";
^^^^^^
SyntaxError: Unexpected token export
This wasn’t happening with the previous edition of jest-expo
and sentry-expo
, is anyone else seeing this?
My Jest.config.js
// jest.config.js
module.exports = {
preset: 'jest-expo',
coverageThreshold: {
global: {
statements: 80,
},
},
collectCoverageFrom: ['<rootDir>/src/**/*.js'],
projects: [
{
name: 'unit',
setupFiles: ['jest-prop-type-error', './jestSetup.js'],
testMatch: ['<rootDir>/src/**/*.(test|spec).js'],
preset: 'jest-expo',
snapshotSerializers: ['enzyme-to-json/serializer'],
},
{
name: 'lint',
preset: 'jest-expo',
runner: 'jest-runner-eslint',
testMatch: ['<rootDir>/src/**/*.js'],
},
],
};