question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

flatMap is not a function

See original GitHub issue

šŸ› Bug Report

environment:

  • node v10.20.1
  • nextjs v9.3.5
  • jest 26.1.0
  • ts-jest 26.1.3

configs:

// .babelrc
{
    "presets": ["next/babel"],
    "plugins": ["babel-plugin-styled-components"]
}

// jest.config.js

module.exports = {
  clearMocks: true,
  moduleFileExtensions: [
    "js",
    "json",
    //   "jsx",
    "ts",
    "tsx",
    //   "node"
  ],
  preset: "ts-jest",
  testPathIgnorePatterns: ["./.next/", "/node_modules/"],
};

// tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "downlevelIteration": true,
    "importHelpers": true,
    "lib": ["dom", "dom.iterable", "es2019"],
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react"
  },
  "exclude": ["node_modules", "out", "public", "static"]
}

Cannot run tests that use flatMap.

To Reproduce

Steps to reproduce the behavior:

  • Use flatmap in a test.

Expected behavior

  • works

Link to repo (highly encouraged)

https://gitlab.com/robotandkid/app-exploding-dogs/-/tree/test/ts-jest

Debug log:

# content of ts-jest.log :
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"26.1.3"},"message":"creating Importer singleton","sequence":1,"time":"2020-07-23T04:55:43.083Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"26.1.3"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2020-07-23T04:55:43.091Z"}
{"context":{"actualVersion":"26.1.0","expectedVersion":">=26 <27","logLevel":20,"namespace":"versions","package":"ts-jest","version":"26.1.3"},"message":"checking version of jest: OK","sequence":3,"time":"2020-07-23T04:55:43.095Z"}
{"context":{"baseOptions":{},"logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformerId":1,"version":"26.1.3"},"message":"created new transformer","sequence":4,"time":"2020-07-23T04:55:43.096Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.test.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.test.ts","sequence":5,"time":"2020-07-23T04:55:43.097Z"}
{"context":{"logLevel":30,"namespace":"jest-transformer","package":"ts-jest","transformerId":1,"version":"26.1.3"},"message":"no matching config-set found, creating a new one","sequence":6,"time":"2020-07-23T04:55:43.097Z"}
{"context":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"logLevel":20,"namespace":"backports","package":"ts-jest","transformerId":1,"version":"26.1.3"},"message":"backporting config","sequence":7,"time":"2020-07-23T04:55:43.098Z"}
{"context":{"jestConfig":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{"ts-jest":{}},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"version":"26.1.3"},"message":"normalized jest config","sequence":8,"time":"2020-07-23T04:55:43.098Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsJestConfig":{"compiler":"typescript","diagnostics":{"ignoreCodes":[6059,18002,18003],"pretty":true,"throws":true},"isolatedModules":false,"packageJson":{"kind":"file"},"transformers":[],"tsConfig":{"kind":"file"}},"version":"26.1.3"},"message":"normalized ts-jest config","sequence":9,"time":"2020-07-23T04:55:43.099Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"version":"26.1.3"},"message":"babel is disabled","sequence":10,"time":"2020-07-23T04:55:43.116Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","requireResult":{"exists":true,"given":"typescript","path":"/Users/uri/Documents/app-exploding-dogs/node_modules/typescript/lib/typescript.js"},"version":"26.1.3"},"message":"loaded module typescript","sequence":11,"time":"2020-07-23T04:55:43.117Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"26.1.3"},"message":"patching typescript","sequence":12,"time":"2020-07-23T04:55:43.117Z"}
{"context":{"actualVersion":"3.9.7","expectedVersion":">=3.8 <4","logLevel":20,"namespace":"versions","package":"ts-jest","version":"26.1.3"},"message":"checking version of typescript: OK","sequence":13,"time":"2020-07-23T04:55:43.118Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsConfigFileName":"/Users/uri/Documents/app-exploding-dogs/tsconfig.json","version":"26.1.3"},"message":"readTsConfig(): reading /Users/uri/Documents/app-exploding-dogs/tsconfig.json","sequence":14,"time":"2020-07-23T04:55:43.118Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsconfig":{"compileOnSave":false,"configFileSpecs":{"excludeSpecs":["node_modules","out","public","static"],"includeSpecs":["**/*"],"validatedExcludeSpecs":["node_modules","out","public","static"],"validatedIncludeSpecs":["**/*"],"wildcardDirectories":{"/users/uri/documents/app-exploding-dogs":1}},"errors":[],"fileNames":["/Users/uri/Documents/app-exploding-dogs/jest.config.js","/Users/uri/Documents/app-exploding-dogs/next-env.d.ts","/Users/uri/Documents/app-exploding-dogs/next.config.js","/Users/uri/Documents/app-exploding-dogs/cosmos/cosmos.fixtures.ts","/Users/uri/Documents/app-exploding-dogs/src/react-app-env.d.ts","/Users/uri/Documents/app-exploding-dogs/src/setupTests.ts","/Users/uri/Documents/app-exploding-dogs/src/components/AppWrapper.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/Avatar/Avatar.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/Players/GameWaitingRoomPlayers.fixture.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/Players/GameWaitingRoomPlayers.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.fixture.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.test.ts","/Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/GameWaitingRoom.fixture.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/GameWaitingRoom.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/Lobby.fixture.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/Lobby.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/PlayGame.fixture.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/PlayGame.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/pages/Welcome.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/globalStyles.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/Button/Button.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/Modal/Modal.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/Toast/Toast.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/TypewriterText/TypewriterText.tsx","/Users/uri/Documents/app-exploding-dogs/src/components/ui/pixi/pixi.tsx","/Users/uri/Documents/app-exploding-dogs/src/firebase/firebase.tsx","/Users/uri/Documents/app-exploding-dogs/src/firebase/firebase.types.tsx","/Users/uri/Documents/app-exploding-dogs/src/game/game.test.tsx","/Users/uri/Documents/app-exploding-dogs/src/game/game.tsx","/Users/uri/Documents/app-exploding-dogs/src/game/game.types.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/_app.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/_document.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/game-waiting-room.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/index.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/lobby.tsx","/Users/uri/Documents/app-exploding-dogs/src/pages/play.tsx","/Users/uri/Documents/app-exploding-dogs/src/state/appState.ts","/Users/uri/Documents/app-exploding-dogs/src/state/appState.types.ts","/Users/uri/Documents/app-exploding-dogs/src/state/game.tsx","/Users/uri/Documents/app-exploding-dogs/src/state/player.tsx","/Users/uri/Documents/app-exploding-dogs/src/state/route.tsx","/Users/uri/Documents/app-exploding-dogs/src/utils/array.test.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/array.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/bacon.tsx","/Users/uri/Documents/app-exploding-dogs/src/utils/gameCode.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/set.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/shuffle.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/time.ts","/Users/uri/Documents/app-exploding-dogs/src/utils/useEffectOnce.tsx"],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"configFilePath":"/Users/uri/Documents/app-exploding-dogs/tsconfig.json","declaration":false,"downlevelIteration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"importHelpers":true,"inlineSourceMap":false,"inlineSources":true,"isolatedModules":true,"jsx":2,"lib":["lib.dom.d.ts","lib.dom.iterable.d.ts","lib.es2019.d.ts"],"module":1,"moduleResolution":2,"noEmit":false,"outDir":"$$ts-jest$$","removeComments":false,"resolveJsonModule":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":1},"raw":{"compileOnSave":false,"compilerOptions":{"allowJs":true,"allowSyntheticDefaultImports":true,"downlevelIteration":true,"esModuleInterop":true,"forceConsistentCasingInFileNames":true,"importHelpers":true,"isolatedModules":true,"jsx":"react","lib":["dom","dom.iterable","es2019"],"module":"esnext","moduleResolution":"node","noEmit":true,"resolveJsonModule":true,"skipLibCheck":true,"strict":true,"target":"es5"},"exclude":["node_modules","out","public","static"]},"typeAcquisition":{"enable":false,"exclude":[],"include":[]},"wildcardDirectories":{"/users/uri/documents/app-exploding-dogs":1}},"version":"26.1.3"},"message":"normalized typescript config","sequence":15,"time":"2020-07-23T04:55:43.139Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/state/appState.types.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/state/appState.types.ts","sequence":16,"time":"2020-07-23T04:55:43.148Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.tsx","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/components/Players/Players.tsx","sequence":17,"time":"2020-07-23T04:55:43.151Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/state/appState.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/state/appState.ts","sequence":18,"time":"2020-07-23T04:55:43.304Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/utils/array.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/utils/array.ts","sequence":19,"time":"2020-07-23T04:55:43.327Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/components/Avatar/Avatar.tsx","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/components/Avatar/Avatar.tsx","sequence":20,"time":"2020-07-23T04:55:43.330Z"}
{"context":{"fileName":"/Users/uri/Documents/app-exploding-dogs/src/components/ui/globalStyles.tsx","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"config":{"automock":false,"cache":true,"cacheDirectory":"/private/var/folders/gz/g381cj2s4ts6cz4_819d5qgh0000gn/T/jest_dx","clearMocks":true,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/Users/uri/Documents/app-exploding-dogs","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"extraGlobals":[],"forceCoverageMatch":[],"globals":{},"haste":{"computeSha1":false,"throwOnModuleCollision":false},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","json","ts","tsx"],"moduleNameMapper":[],"modulePathIgnorePatterns":[],"name":"13720eb6b182c481294ecb8b11bd2714","prettierPath":"prettier","resetMocks":false,"resetModules":false,"restoreMocks":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","roots":["/Users/uri/Documents/app-exploding-dogs"],"runner":"jest-runner","setupFiles":[],"setupFilesAfterEnv":[],"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"/Users/uri/Documents/app-exploding-dogs/node_modules/jest-environment-jsdom/build/index.js","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["**/__tests__/**/*.[jt]s?(x)","**/?(*.)+(spec|test).[tj]s?(x)"],"testPathIgnorePatterns":["./.next/","/node_modules/"],"testRegex":[],"testRunner":"/Users/uri/Documents/app-exploding-dogs/node_modules/@jest/core/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/Users/uri/Documents/app-exploding-dogs/node_modules/ts-jest/dist/index.js",{}]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"instrument":false,"rootDir":"/Users/uri/Documents/app-exploding-dogs","supportsDynamicImport":false,"supportsStaticESM":false},"transformerId":1,"version":"26.1.3"},"message":"computing cache key for /Users/uri/Documents/app-exploding-dogs/src/components/ui/globalStyles.tsx","sequence":21,"time":"2020-07-23T04:55:43.334Z"}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
ahnpnlcommented, Jul 26, 2020

More information: https://github.com/Microsoft/TypeScript/issues/20095 Apparently TypeScript doesnā€™t automatically polyfill so yes itā€™s different from Babel.

To opt-in polyfills you can follow this https://github.com/kulshekhar/ts-jest/issues/828#issuecomment-433976880

1reaction
frankandrobotcommented, Jul 23, 2020

i donā€™t understandā€¦ isnā€™t ts-jest supposed to transpile the code similar to babel? es2019 is in the tsconfig file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: flatMap is not a function in JavaScript | bobbyhadz
To solve the "flatMap is not a function" error, make sure to only call the flatMap method on arrays and in browsers that...
Read more >
flatMap method over array - (flatMap is not a function)
The flatMap() method first maps each element using a mapping function, then flattens the result into a new array. It is identical to...
Read more >
flatMap is not a function (typescript) Ā· Issue #427 - GitHub
The most likely cause of this is that the version of node used by your system doesn't support flatMap . flatMap was introduced...
Read more >
ERROR: products.flatMap is not a function - n8n community
I'm trying to do an API integration with an online store. I download a list of products from the store via HTTP request....
Read more >
TypeError: lookup.flatMap is not a function - SharePoint Stack ...
I am not able to find any information about this error on google. TypeError: lookup.flatMap is not a function. enter image description here....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found