I’ve been trying to setup jest for use with typescript and I’ve tried a bunch of fixes with no luck. I’m getting the error SyntaxError: Unexpected token, expected ";", I think the config isn’t supporting typescript code: https://i.stack.imgur.com/iGBCa.png If anybody has any suggestions I’d be very grateful! Here’s my package.json: "jest": { "preset": "ts-jest", "testEnvironment": […]
- Tags "!__tests__/util.ts", "!**/node_modules/**" ], "!/coverage/**", "/js/**", "allowSyntheticDefaultImports": true, "automock": false, "collectCoverageFrom": [ "**/*.{js, "dom.iterable", "esModuleInterop": true, "esnext" ], "forceConsistentCasingInFileNames": false, "include": ["next-env.d.ts", "isolatedModules": true, "jsx": "preserve" }, "lib": [ "dom", "module": "esnext", "moduleFileExtensions": [ "ts", "moduleResolution": "node", "node" ] } tsconfig.json: { "compilerOptions": { "allowJs": true, "noImplicitAny": false, "resolveJsonModule": true, "rootDir": "../", "setupFilesAfterEnv": [ "jest-extended" ], "skipLibCheck": true, "target": "esnext" }, "transform": { "^.+\\.tsx?$": "babel-jest" }, "types": [ "jest", "types": ["@emotion/core", { strict: false }), }, //"noEmit": true, #TS, baseUrl, clearMocks: true } }, exclude: /node_modules/, expected ", I think the config isn't supporting typescript code: https://i.stack.imgur.com/iGBCa.png If anybody has any suggestions I'd be very grateful, I've been trying to setup jest for use with typescript and I've tried a bunch of fixes with no luck. I'm getting the error SyntaxError: Unexp, Jest, json, jsx, testEnvironment: 'node', testPathIgnorePatterns: ['\\\\node_modules\\\\'], ts=x, verbose = TRUE