-
Notifications
You must be signed in to change notification settings - Fork 40
Neotest integration (neotest-jest) #2
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
Comments
When I use https://github.com/haydenmeade/neotest-jest/compare/main...entropitor:neotest-jest:support-debugging?expand=1 I can get it to run but it doesn't seem to recognize breakpoints AFAICT. Is it possible some of your hackery around break-points is not working properly while using jest this way? |
Hmm, I was able to get jest working with breakpoints, but I was using this configuration. Maybe it's important to keep runtime executable as I'm taking a look at your fork right now, will let you know what I find! |
output.webmHmm, very strange - your fork seems to work fine on my system? I am running on OSX, and I have a test running on ubuntu that passes which tests for breakpoints. Can I get more details on your system? Also, do the tests pass for you? |
I see there was an The lua tests of this repo pass when I run it. And when I run a node program, I'm able to get it stopped properly on breakpoints. But not when using the neotest thing following my branch. It just "hangs" and weirdly enough, I can tell it to continue (through DAP) and that works but it never tells me it stopped on a breakpoint and I cannot see scopes / expressions / ... (Maybe somehow I'm not getting the right "subsession" and it's showing my different session?) I didn't test it using the node version though (the different launch config), did you use that or did you use more or less my branch? I'm on OSX as well. Maybe there is some weird stuff going on with typescript / monorepo? Or maybe because of a different jest version? Or different configuration? I didn't pass anything to neotest-jest and I just configure your plugin as require("dap-vscode-js").setup({
adapters = {
"pwa-node",
"pwa-chrome",
"pwa-msedge",
"node-terminal",
"pwa-extensionHost",
}, -- which adapters to register in nvim-dap
}) |
It seems to know the breakpoints and I receive an Did you configure your adapter differently? Are you using latest version of nvim-dap? (the node vs jest starting doesn't seem to matter because starting through jest ends up running node through the shebang of jest) |
I took a closer look at this and was able to reproduce a very similar bug. The fix was to include the If that does not work, if you could send me your full request/response log that would be very helpful. I also have created a You can also pass a |
Oh, and to respond to your question:
Yes to the second question, and technically I used the same config from your fork (I fixed that It was precisely this difference in configuration which I was able to rectify by passing a |
The
When I run it with my own project, I get these logs: Notice how the stackTrace doesn't get any response (not even present in dap_vscode_js.log), no matter how long I wait. It seems to send it on the same session/channel as the |
I think my branch on neotest-jest should be okay. It seems like it just doesn't work well together with an old version of jest or something. It seems to work well in the integration.spec.ts directory on this repo. |
I've created nvim-neotest/neotest-jest#26 to add this support into neotest-jest |
I guess this ticket can be closed. Not sure if my issues above are really due to this adapter but maybe more a bug in jest or something. Sometimes it works... |
Thank you so much for this! Sorry for my sudden inactivity, I got a bit sidetracked with some other matters :) I've made a separate PR for this issue, see #4. If you could report your jest version that would be very helpful. I did take a look into your log and did not find anything obvious (I was hoping it might be an issue with child processes, but it doesn't seem so, at least not obviously). I haven't done a very thorough investigation into your logfile though. Really, until I have a reproduction (e.g. a minimal setup with package.json + package-lock.json) I can only speculate. If you can provide that then I'll certainly look further into it! If not, hopefully others will encounter this issue and give some more perspective. |
Will require a PR on neotest-jest. Posted here for issue tracking purposes.
The text was updated successfully, but these errors were encountered: