Open MrSamsa42 opened 5 years ago
It took forever, but I found the solution. Stack Overflow to the rescue (again): https://stackoverflow.com/questions/9249830/how-can-i-set-node-env-production-on-windows
So, change the script in the package.json file to:
"test-schema": "set GQL_LESSON=lesson-2 && npm test -- -t lesson-2"
It should be:
"test-schema": "cross-env GQL_LESSON=lesson-2 npm test -- -t lesson-2"
I am not able to run the tests associated with lesson 2. See terminal output below. Environment is Windows 10, Node 12.10
npm run test-schema
'GQL_LESSON' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! intro-to-gql@1.0.0 test-schema:
GQL_LESSON=lesson-2 npm test -- -t lesson-2
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the intro-to-gql@1.0.0 test-schema script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\mrsam\AppData\Roaming\npm-cache_logs\2019-11-03T21_38_39_591Z-debug.log