Closed david-gang closed 7 years ago
This is definitely a known issue and as a Windows user, it's been bugging me for a long time.
w/ GitHub shell, it fails like you have above. You can doctor the command into two commands:
set NODE_ENV=test
mocha --compilers js:babel-register --recursive $(find test -name '*Test.js'
This will work and tests will start running. The unit tests will work fine, there are problems at the moment w/ Spectron tests on Windows (the ones which pop up the window and use web driver to test).
What would be great would be to replace the npm test commands with a node.js script that we can use instead (which is multi-OS friendly).
Work is in progress here: https://github.com/brave/browser-laptop/tree/windows-tests
I believe this is resolved now! (huge thanks to @bbondy, who knocked this out). There are some errors still, but it's mostly working 😄
Did you search for similar issues before submitting this one? Yes Describe the issue you encountered:
Expected behavior:
The problem is described at http://stackoverflow.com/questions/11928013/node-env-is-not-recognized-as-an-internal-or-external-command-operable-comman
In git bash the command works.