Urigo / WhatsApp-Clone-Client-React

https://www.tortilla.academy/Urigo/WhatsApp-Clone-Tutorial
https://tortilla.academy
614 stars 144 forks source link

yarn test - 'TZ' is not recognized as an internal or external command #1195

Closed peterennis closed 4 years ago

peterennis commented 5 years ago

Windows 10

C:\ae\ae-whatsapp-clone\WhatsApp-Clone-Client-React>yarn test
yarn run v1.17.3
$ TZ="Asia/Jerusalem" react-scripts test
'TZ' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\ae\ae-whatsapp-clone\WhatsApp-Clone-Client-React>
micahgoodreau commented 5 years ago

for windows, in the package.json file change the test line under scripts to: "test": "SET TZ=\"Asia/Jerusalem\" && jest --runInBand --forceExit",

Urigo commented 4 years ago

Fixed this on the new version, now using environment variable inside .env.test:

TZ=UTC
Urigo commented 4 years ago

will push the new version later today

f412h4d commented 2 years ago

for windows, in the package.json file change the test line under scripts to: "test": "SET TZ="Asia/Jerusalem" && jest --runInBand --forceExit",

actually, you need to escape the double quotes "SET TZ=\"UTC\" && jest"

mbirali commented 1 year ago

You just need to start script with jest and remove other prefix before jest ! (worked for me!)