Open justgage opened 1 year ago
I think this file might be where the config would be injected: https://github.com/marilari88/neotest-vitest/blob/main/lua/neotest-vitest/init.lua#L72
We're facing a similar issue, where we want to use neotest with in-source tests. Not all of our source files have inline tests, but some do. Parsing the config might be annoying, but I think it would be the best way to accomplish this.
This could also solve the problem of new module extensions like: .cjs, .mts, .cts, .mjs (which also includes the possibility of having a vitest.config.mts
).
neotest-vitest fails to run on projects that use those. 😢
I'm in a kind of weird situation where we're transitioning to vitest and thus have tests matched like this so we can run both jest and vitest (as we transition).
But this plugin doesn't seem to make that configurable or inspect the config to figure that out. I admit parsing the config would be annoying so I think being able to configure which file extensions might be the best way forward.