You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, the condition that 'jest' must be a dependency in the package.json is too strong for some uses cases. In my case, we have the dependency encapsulated in another package with abstractions and helpers for test run.
It would be nice if is_test_file could be overridden as other adapters allow.
I was as able to override the function in the adapter,
localjest_adapter=require('neotest-jest')({ jestCommand='yarn run jest', jestConfigFile=_G.jtest_config_file, cwd=_G.jtest_cwd })
jest_adapter.is_test_file=_G.jtest_is_test_file
but it was not pleasant as it could be through the config table.
I'm working on a legacy project at work and all the test files are named like *.tests.ts
This is causing a no tests found error. It looks like the filename matching is using a hard-coded list of file names and extensions defined here. https://github.com/nvim-neotest/neotest-jest/blob/main/lua/neotest-jest/init.lua#L107
Wouldn't it be better to use the pattern matching defined in the user's jest config or allow the user to define custom filename patterns.
for example, in the jest config in the project we are working on we using the following pattern:
The text was updated successfully, but these errors were encountered: