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
Hi,
Actually working in a monorepo, I have tests in my_project/frontend/tests.
If I cd into my_project/frontend tests are found and neotest is working perfectly.
But If I only cd into the root directory of my project, test are not found.
I saw this on vim-test documentation :
Working directory
Test.vim relies on you being cd-ed into the project root. However, sometimes you may want to execute tests from a different directory than Vim's current working directory. You might have a bigger project or monorepo with many subprojects, or you might be using autochdir. In any case, you can tell test.vim to use a different working directory for running tests:
let test#project_root ="/path/to/your/project"
Unfortunately, if I set test#project_root to my_project/frontent or my_project/frontend/tests and only cd into the root directory of my project ( my_project/). Tests aren't found.
How can I make vim-test / neotest-vim-test found my tests folder without always cd in the direct parent folder of my tests ? (here my_project/frontend)
EDIT : Found a workaround using
vim.cmd("cd ./frontend")
But shouldn't let test#project_root = "/path/to/your/project" do the job ?
The text was updated successfully, but these errors were encountered:
Hi,
Actually working in a monorepo, I have tests in
my_project/frontend/tests
.If I
cd
intomy_project/frontend
tests are found andneotest
is working perfectly.But If I only cd into the root directory of my project, test are not found.
I saw this on
vim-test
documentation :Working directory
Test.vim relies on you being cd-ed into the project root. However, sometimes you may want to execute tests from a different directory than Vim's current working directory. You might have a bigger project or monorepo with many subprojects, or you might be using autochdir. In any case, you can tell test.vim to use a different working directory for running tests:
Unfortunately, if I set
test#project_root
tomy_project/frontent
ormy_project/frontend/tests
and onlycd
into the root directory of my project (my_project/
). Tests aren't found.How can I make
vim-test
/neotest-vim-test
found my tests folder without alwayscd
in the direct parent folder of my tests ? (heremy_project/frontend
)EDIT : Found a workaround using
But shouldn't
let test#project_root = "/path/to/your/project"
do the job ?The text was updated successfully, but these errors were encountered: