569532 (7) [Avatar] Offline
#1
Hey,

First, great course, very instructive.

I reached a road block with running mocha tests on Windows.
When I run this:
"scripts": {
"integration-test": "env TEST_MODE=handler ./node_modules/.bin/mocha tests/test_cases/*.js --reporter spec"
},

This is the message I receive:
'env' is not recognized as an internal or external command,


1. I understand there might be some issues on Windows in this regard, what is the best solution in your experience to go around this problem?
2. What is we were working on a team project, and one of use is using windows? What is the general solution that doesn't compromise the compatibility of the source-code?

Thank you.
Moaaz

Yan Cui (65) [Avatar] Offline
#2
On windows, I think you have to use 'set' to set environment variables in the current window.

If you're working in a team where people are using different OS, then you might have to create a separate set of NPM scripts and deployment scripts. Maybe the Windows Subsystem for Linux (WSL) can let you sidestep all that, but I don't have any experience with it myself, and it's also down to the individuals to use WSL when developing on these projects.
569532 (7) [Avatar] Offline
#3
Yes, I followed an SO example, built couldn't figure out how to pass more than one variable.
It is not a big problem tho, thank you.