hbenl / vscode-mocha-test-adapter

Mocha Test Adapter for the VS Code Test Explorer
MIT License
91 stars 31 forks source link

Fix navigation to .ts in some cases with path convention mismatches #152

Closed nguerrera closed 3 years ago

nguerrera commented 3 years ago

I decided to dig a little deeper on https://github.com/hbenl/vscode-mocha-test-adapter/issues/60#issuecomment-819907576 and was able to make a change that resolved my issue.

The fix here is to normalize all paths before comparing them in findCallLocation.

nguerrera commented 3 years ago

This fix has a larger impact than I expected and I am seeing failing tests expecting / instead of \. Seeing if I can do something more targeted before wondering if test expectations can be adjusted.

nguerrera commented 3 years ago

Hmm, maybe not, I see the same failures on windows without my change:

image

nguerrera commented 3 years ago

So it turns out that there were more related issues and they were related to the test failures that pre-existed my change on Windows. I did some more work and almost have everything green. I will reopen another PR when I get that working.