-
Notifications
You must be signed in to change notification settings - Fork 455
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
The debugger doesn't stop at correct statements in VSCode in source files #484
Comments
Confirmed that issue is reproducible with latest version ts-jest@22.0.4, and updated repro repo and issue description |
Same problem in Webstorm |
I removed |
Thanks but no luck in my environment (Create-React-App-Typescript): // package.json
// ...
"scripts": {
"test": "jest --verbose --notify",
"test:watch": "jest --watch --notify",
"test:debug": "jest --debug",
"test:update": "jest -u",
"coverage": "jest --coverage --silent"
},
"jest": {
"setupFiles": [
"<rootDir>/config/test-shim.js",
"<rootDir>/config/test-setup.js"
],
"globals": {
"ts-jest": {
"skipBabel": true
}
},
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.(ts|tsx)$": "<rootDir>/config/test-preprocessor.js",
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/config/assetsTransformer.js",
"\\.(css|less)$": "<rootDir>/config/assetsTransformer.js"
},
"roots": [
"src"
],
"testMatch": [
"**/test/*.(test).(ts|tsx|js)"
],
"collectCoverageFrom": [
"src/orm/**/*.{js,tsx,ts}",
"!src/index.tsx",
"!src/App.tsx",
"!src/orm/test/models/**"
]
}
// ... |
I've taken a look at the linked repo and can confirm noticing this issue. I tried debugging a bit but couldn't figure out the root cause. |
Maybe the root cause has more to do with jest itself than with ts-jest |
The fix for #485 (which seems to be in jest) might fix this but that's just a hunch and not based on any evidence |
Indeed, it seems to be a jest issue |
@YagoLopez thanks for testing that out! |
Is it jestjs/jest#5739? jestjs/jest#5925 is for thrown errors, not source stepping |
@SimenB that's correct, thanks for the clarification |
@YagoLopez did you find a workaround? Thanks Running the test like with the following config
|
Sorry but not. Are you in the latest versions of IntelliJ with all dependencies up to date (jest, ts-jest, etc)? May be that could help but I cannot confirm it. |
Yeah yarn outdated spits nothing so I should be up to date. Thanks for answering. |
Take a look at this: And a little of more info here: If you have luck, please report it here. |
Having same issue here, I thought it was related to multiline But if you try to debug in vscode with Here is the minimal repo: https://github.com/huafu/issue-ts-jest-wrong-line FYI my jest cache has been cleared, and I'm using an up to date vscode on latest macOS |
fixed in |
kulshekhar/ts-jest#484 - removing collectCoverage fixed the issue, in CI the flag in test job should take care of creating coverage.
Reproducible on ts-jest |
Here is new issue created #917 . |
Issue
The debugger doesn't stop at correct statements in VSCode in source files
Expected behavior
The debugger should stop at correct statements in VSCode for source files
Link to a minimal repo that reproduces this issue
ts-jest-node8-debugger-repro/jest-22-test
Optional (but highly recommended) - Configure Travis (or your favorite system) with the minimal repo
Done
The text was updated successfully, but these errors were encountered: