nvim-neotest / neotest-jest

MIT License
116 stars 79 forks source link

Configuring neotest-jest tests for local development #114

Open conermurphy opened 5 months ago

conermurphy commented 5 months ago

I'm looking to help write some tests for the repo, namely to try help with the issue I raised earlier this week #113 and try find the cause of the issue.

However, when I try to configure the tests locally following the documentation in the README, I'm returned the below error and can't find any other documentation/issues to help debug it so hopefully someone else might know the answer and what I can do to remedy this issue and get the tests running locally.

Output of the ./scripts/test command:

Error detected while processing command line:
E492: Not an editor command: PlenaryBustedDirectory tests/ {minimal_init = 'tests/init.vim'}

Worth noting that this just hangs forever and I have to force exit out of it.

MisanthropicBit commented 1 month ago

My guess would be that the paths set up in tests/init.vim when neovim is executed in the ./scripts/test script don't correspond to the installation paths of those plugins in your local setup. Consequently, plenary isn't set up correctly so when neovim runs the PlenaryBustedDirectory command, you get the above error message. So you would have to update the paths to match your local installations of those plugins.

I would suspect you need to force exit the command because running nvim --headless -u NONE -c ThisCommandDoesNotExist will hang. You would instead do something like nvim --headless -u NONE -c ThisCommandDoesNotExist -c quitall to make it quit after running the command. This might be doable even though the output of the neovim process is piped to tee.