thenbe / neotest-playwright

A playwright adapter for neotest.
MIT License
39 stars 5 forks source link

Unable to resolve playwright binary #37

Open rafaelrinaldi opened 2 months ago

rafaelrinaldi commented 2 months ago

It seems like this plugin is trying to find the playwright binary in the directory of the file I have open instead of the project's root.

For instance, if I open the following test file in /Users/jarvis/work/react-project/e2e/HomeScrreen/HomeScreen.test.ts and then I run ltt to run the tests for the file, I get the following error:

Neotest: neotest-playwright: Error: Unable to locate playwright binary. Expected to find it at: /Users/jarvis/work/react-project/e2e/HomeScreen/node_modules/.bin/playwright

I would expect the binary to be read from /Users/jarvis/work/react-project/node_modules/.bin/playwright instead.

A simple way to solve this is to install Playwright globally on my machine but I'd like to know if I am missing something.

Note: I am running Neovim via the latest LazyVim.

thenbe commented 2 months ago

As it stands, this plugin doesn't really exert a lot of effort looking for the playwright binary. There's a lot of room for improvement, especially now that some powerful path finding utilities have finally landed in nvim 0.10.

For now though, your options are either:

or