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

[beta] cannot collect coverage with babel@7 #713

Closed
Ailrun opened this issue Sep 12, 2018 · 1 comment
Closed

[beta] cannot collect coverage with babel@7 #713

Ailrun opened this issue Sep 12, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@Ailrun
Copy link

Ailrun commented Sep 12, 2018

Issue :

ts-jest@next cannot collect coverage with babel@7

Expected behavior :

Coverage data is successfully collected by ts-jest

Output from debug log:

# content of debug.txt :
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"23.10.0-beta.5"},"message":"creating Importer singleton","sequence":1,"time":"2018-09-12T15:33:57.112Z"}
{"context":{"allowJs":false,"logLevel":20,"namespace":"jest-preset","package":"ts-jest","version":"23.10.0-beta.5"},"message":"creating jest presets not handling JavaScript files","sequence":2,"time":"2018-09-12T15:33:57.115Z"}
{"context":{"actualVersion":"23.6.0","expectedVersion":">=22 <24","logLevel":20,"namespace":"versions","package":"ts-jest","version":"23.10.0-beta.5"},"message":"checking version of jest: OK","sequence":3,"time":"2018-09-12T15:33:57.117Z"}
{"context":{"baseOptions":{},"logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformerId":1,"version":"23.10.0-beta.5"},"message":"created new transformer","sequence":4,"time":"2018-09-12T15:33:57.117Z"}
{"context":{"fileName":"/home/jjc/Test/ts-jest-issue713/test/test.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"instrument":false,"rootDir":"/home/jjc/Test/ts-jest-issue713"},"transformerId":1,"version":"23.10.0-beta.5"},"message":"computing cache key for /home/jjc/Test/ts-jest-issue713/test/test.ts","sequence":5,"time":"2018-09-12T15:33:57.118Z"}
{"context":{"logLevel":30,"namespace":"jest-transformer","package":"ts-jest","transformerId":1,"version":"23.10.0-beta.5"},"message":"no matching config-set found, creating a new one","sequence":6,"time":"2018-09-12T15:33:57.118Z"}
{"context":{"config":{"automock":false,"browser":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/home/jjc/Test/ts-jest-issue713","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"filter":null,"forceCoverageMatch":[],"globals":{"ts-jest":{"babelConfig":true}},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","jsx","json","ts","tsx"],"moduleNameMapper":{},"modulePathIgnorePatterns":[],"name":"31640514bc6f1994866dcfd0f0776901","prettierPath":null,"resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/home/jjc/Test/ts-jest-issue713","roots":["/home/jjc/Test/ts-jest-issue713"],"runner":"jest-runner","setupFiles":[],"setupTestFrameworkScriptFile":null,"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"jest-environment-jsdom","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["/home/jjc/Test/ts-jest-issue713/test/**/*.ts"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":"","testRunner":"/home/jjc/Test/ts-jest-issue713/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/home/jjc/Test/ts-jest-issue713/node_modules/ts-jest/dist/index.js"]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"logLevel":20,"namespace":"backports","package":"ts-jest","transformerId":1,"version":"23.10.0-beta.5"},"message":"backporting config","sequence":7,"time":"2018-09-12T15:33:57.118Z"}
{"context":{"jestConfig":{"automock":false,"browser":false,"cache":true,"cacheDirectory":"/tmp/jest_rs","clearMocks":false,"coveragePathIgnorePatterns":["/node_modules/"],"cwd":"/home/jjc/Test/ts-jest-issue713","detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"filter":null,"forceCoverageMatch":[],"globals":{"ts-jest":{"babelConfig":true}},"haste":{"providesModuleNodeModules":[]},"moduleDirectories":["node_modules"],"moduleFileExtensions":["js","jsx","json","ts","tsx"],"moduleNameMapper":{},"modulePathIgnorePatterns":[],"name":"31640514bc6f1994866dcfd0f0776901","prettierPath":null,"resetMocks":false,"resetModules":false,"resolver":null,"restoreMocks":false,"rootDir":"/home/jjc/Test/ts-jest-issue713","roots":["/home/jjc/Test/ts-jest-issue713"],"runner":"jest-runner","setupFiles":[],"setupTestFrameworkScriptFile":null,"skipFilter":false,"snapshotSerializers":[],"testEnvironment":"jest-environment-jsdom","testEnvironmentOptions":{},"testLocationInResults":false,"testMatch":["/home/jjc/Test/ts-jest-issue713/test/**/*.ts"],"testPathIgnorePatterns":["/node_modules/"],"testRegex":"","testRunner":"/home/jjc/Test/ts-jest-issue713/node_modules/jest-jasmine2/build/index.js","testURL":"http://localhost","timers":"real","transform":[["^.+\\.tsx?$","/home/jjc/Test/ts-jest-issue713/node_modules/ts-jest/dist/index.js"]],"transformIgnorePatterns":["/node_modules/"],"watchPathIgnorePatterns":[]},"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"version":"23.10.0-beta.5"},"message":"normalized jest config","sequence":8,"time":"2018-09-12T15:33:57.119Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsJestConfig":{"babelConfig":{"kind":"file"},"compiler":"typescript","diagnostics":{"ignoreCodes":[6059,18002,18003],"pretty":true,"throws":true},"isolatedModules":false,"transformers":[],"tsConfig":{"kind":"file"}},"version":"23.10.0-beta.5"},"message":"normalized ts-jest config","sequence":9,"time":"2018-09-12T15:33:57.119Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"23.10.0-beta.5"},"message":"loaded module babel-core","sequence":10,"time":"2018-09-12T15:33:57.130Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"23.10.0-beta.5"},"message":"patching babel-core","sequence":11,"time":"2018-09-12T15:33:57.130Z"}
{"context":{"actualVersion":"7.0.0-bridge.0","expectedVersion":">=6 <7 || 7.0.0-bridge.0","logLevel":20,"namespace":"versions","package":"ts-jest","version":"23.10.0-beta.5"},"message":"checking version of babel-core: OK","sequence":12,"time":"2018-09-12T15:33:57.130Z"}
{"context":{"babelConfig":{"babelrc":false,"configFile":false,"cwd":"/home/jjc/Test/ts-jest-issue713","envName":"test","passPerPreset":false,"plugins":[],"presets":[],"root":"/home/jjc/Test/ts-jest-issue713"},"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"version":"23.10.0-beta.5"},"message":"normalized babel config","sequence":13,"time":"2018-09-12T15:33:57.132Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"23.10.0-beta.5"},"message":"loaded module typescript","sequence":14,"time":"2018-09-12T15:33:57.272Z"}
{"context":{"logLevel":20,"namespace":"Importer","package":"ts-jest","version":"23.10.0-beta.5"},"message":"patching typescript","sequence":15,"time":"2018-09-12T15:33:57.273Z"}
{"context":{"actualVersion":"3.0.3","expectedVersion":">=2.7 <4","logLevel":20,"namespace":"versions","package":"ts-jest","version":"23.10.0-beta.5"},"message":"checking version of typescript: OK","sequence":16,"time":"2018-09-12T15:33:57.273Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsConfigFileName":"/home/jjc/Test/ts-jest-issue713/tsconfig.json","version":"23.10.0-beta.5"},"message":"readTsConfig(): reading /home/jjc/Test/ts-jest-issue713/tsconfig.json","sequence":17,"time":"2018-09-12T15:33:57.273Z"}
{"context":{"logLevel":20,"namespace":"config","package":"ts-jest","transformerId":1,"tsconfig":{"input":{"compilerOptions":{"baseUrl":"./","outDir":"./dist"},"include":["./src","./test"]},"resolved":{"compileOnSave":false,"configFileSpecs":{"excludeSpecs":["$$ts-jest$$"],"includeSpecs":["./src","./test"],"validatedExcludeSpecs":["$$ts-jest$$"],"validatedIncludeSpecs":["./src","./test"],"wildcardDirectories":{"/home/jjc/Test/ts-jest-issue713/src":1,"/home/jjc/Test/ts-jest-issue713/test":1}},"errors":[],"fileNames":["/home/jjc/Test/ts-jest-issue713/src/index.ts","/home/jjc/Test/ts-jest-issue713/test/test.ts"],"options":{"baseUrl":"/home/jjc/Test/ts-jest-issue713/","configFilePath":"/home/jjc/Test/ts-jest-issue713/tsconfig.json","declaration":false,"esModuleInterop":true,"inlineSourceMap":false,"inlineSources":true,"module":1,"noEmit":false,"outDir":"/home/jjc/Test/ts-jest-issue713/$$ts-jest$$","removeComments":false,"sourceMap":true,"target":1},"raw":{"compileOnSave":false,"compilerOptions":{"baseUrl":"./","declaration":false,"esModuleInterop":true,"inlineSourceMap":false,"inlineSources":true,"module":"commonjs","noEmit":false,"outDir":"$$ts-jest$$","removeComments":false,"sourceMap":true},"include":["./src","./test"]},"typeAcquisition":{"enable":false,"exclude":[],"include":[]},"wildcardDirectories":{"/home/jjc/Test/ts-jest-issue713/src":1,"/home/jjc/Test/ts-jest-issue713/test":1}}},"version":"23.10.0-beta.5"},"message":"normalized typescript config","sequence":18,"time":"2018-09-12T15:33:57.280Z"}
{"context":{"fileName":"/home/jjc/Test/ts-jest-issue713/src/index.ts","logLevel":20,"namespace":"jest-transformer","package":"ts-jest","transformOptions":{"instrument":true,"rootDir":"/home/jjc/Test/ts-jest-issue713"},"transformerId":1,"version":"23.10.0-beta.5"},"message":"computing cache key for /home/jjc/Test/ts-jest-issue713/src/index.ts","sequence":19,"time":"2018-09-12T15:33:57.281Z"}

Minimal repo :

https://github.com/Ailrun/ts-jest-issue713

@huafu huafu changed the title ts-jest@next cannot collect coverage with babel@7 [beta] cannot collect coverage with babel@7 Sep 12, 2018
@huafu huafu self-assigned this Sep 12, 2018
@huafu huafu added the 🐛 Bug label Sep 12, 2018
@huafu huafu added this to the v23.10.0 milestone Sep 12, 2018
huafu added a commit to huafu/ts-jest that referenced this issue Sep 12, 2018
@huafu
Copy link
Collaborator

huafu commented Sep 13, 2018

fixed in #714

@huafu huafu closed this as completed Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants