Open Steinblock opened 6 years ago
I was able to get this working by following this guide: https://stackoverflow.com/a/44450219
edit your ~/.profile (nano) and update your path to:
PATH="$HOME/bin:$HOME/.local/bin:/usr/bin:$PATH"
reload vscode and it should work
Nice I will add this to the FAQ section
Can you write exactly the steps should be done / create a PR with this addition to the README file Tks
@Steinblock could you let me know if this fixed your problem?
Other things you can try
@pieterwillaert Hey! Could you elaborate on what you mean when saying
make sure your nodejs folder is in your windows path
I don't even have nodejs installed on my windows, only for the WSL subsystem.... Unfortunately it is not working for me so far...
@aykesubir see: https://stackoverflow.com/a/27864253/1782659, I think node should be installed on your windows in order to run mocha-sidebar
@pieterwillaert I'll reinstall it and check. And it doesn't matter if it's not the same node instance I use to run my project (which is the node installed on the WSL machine)
I am using Visual Studio Code on windows.
However, the app I am developing runs on linux only.
Generally this is not a problem. I configured
"terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
in my user settings.mocha
from the integrated terminal it works (because node and npm are installed on linux)If I debug my mocha tests within vscode it works, too. This is from my launch.config, notice the
useWSL
switch. Which tells Visual Studio code to use my linux subsystem.However, tests from the moacha sidebar are detected and run with windows.
Not a surprise, because it uses Node from windows
Running Mocha with Node.js at "C:\Program Files\nodejs\node.EXE"
If I understand your docs correctly, there is no way to configure which node will be used, because it takes the one it finds on path: https://github.com/maty21/mocha-sidebar
It would be really helpful, having some control on which command will be executed. So I could just set
to run my test with WSL
This should solve https://github.com/maty21/mocha-sidebar/issues/57 too.