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

fix debugging jest tests in windows #165

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

roguib
Copy link

@roguib roguib commented Feb 18, 2021

Fixes #157 (comment) (only the part where I wasn't able to attach a debugger, resulting in a weird error).

After some research, I found this article with a launch.json configuration that wasn't failing when debugging Jest tests in windows.

Right now I can't test it in other OS, but let me know if the new configuration works for macOS since then we can safely remove the first one.

@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #165 (2ca2e72) into develop (3cfab83) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #165   +/-   ##
========================================
  Coverage    92.97%   92.97%           
========================================
  Files           22       22           
  Lines          598      598           
  Branches       141      141           
========================================
  Hits           556      556           
  Misses          42       42           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cfab83...7f6e7fe. Read the comment docs.

Copy link
Collaborator

@AnatoleLucet AnatoleLucet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really fix #157, does it? Is this only related to the error you had with Jest or is it also solving the falling tests?

"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try adding this windows part to the current config and see if you're still getting the error?

Copy link
Author

@roguib roguib Feb 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, only adding windows in the Debug Jest Tests configuration doesn't solve the issue unless runtimeArgs is modified like this:

"args": ["--runInBand"],
"windows": {
  "program": "${workspaceFolder}/node_modules/jest/bin/jest"
}

What do you think about using only the first configuration but changing these two parameters?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it'd be preferable to fix the existing config

@roguib
Copy link
Author

roguib commented Feb 19, 2021

That's correct, it only fixes the part where I wasn't able to attach the debugger, but I have a guess what could be happening to the failing tests, I just need some time to work on it 😄 I've edited the PR to reflect that.

@roguib
Copy link
Author

roguib commented Feb 23, 2021

Sorry for the late reply. I've applied the mentioned changes, let me know if there's any problem debugging tests in macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests are failing in Windows
2 participants