nvim-neotest / neotest-jest

MIT License
121 stars 80 forks source link

Fixed: Tests cannot be found on windows, due to usage of `\` instead of `/` in the file path. #44

Open DasOhmoff opened 2 years ago

DasOhmoff commented 2 years ago

Fixes #42

Should now work on all platforms, I assume

DasOhmoff commented 2 years ago

By the way, vscode had a similar issue. Maybe this link is somehow helpful.

haydenmeade commented 2 years ago

@DasOhmoff Do you need to only do this in the case of windows? See https://github.com/firsttris/vscode-jest-runner/blob/0321cf70e21b5d541a66a670e3104b5cd30a4704/src/util.ts#L20

DasOhmoff commented 1 year ago

I do think so, but I am not 100% sure. Maybe this might create a bug at some unexpected place, but yet I was not able to find anything like it.

brandonbarkerRAC commented 1 year ago

changing string.gsub(pos.path, '\\', '/') to vim.fs.normalize(pos.path) will achieve this slightly more idiomatically.

Too add to this. Yes it is only needed in the case of windows, but will leave other formats unaffected.

Would love to have this working on windows :)

kipelovets commented 1 year ago

There's still a problem running tests on Windows, maybe this could be merged?

bad4iz commented 9 months ago

this is very relevant and necessary. How are things progressing on this issue?

conermurphy commented 7 months ago

@bad4iz, have you tried running this locally as the vim.fs.normalize that was introduced in #91 should fix this issue.

There is a separate issue I believe regarding other special characters such as []() which I've addressed in a PR #109.

@haydenmeade, can this issue (#44) be closed?