nmf-app
nmf-app copied to clipboard
Fix `yarn test` on Windows
The yarn test
command (which is also run on the pre-commit hook) includes a command for changing the TZ
environment variable to GMT. This does not work for Windows, and a short search around revealed that there's not an easy way update that variable for windows. It can be removed manually when trying to run tests, but it runs jest in your local timezone instead of GMT which messes up the dates in the snapshots.
We need to figure out if there's a way to configure jest to use GMT by default to alleviate this issue.
https://github.com/NMF-earth/nmf-app/pull/210 could be a solution, but we need a proper research on the side effects
As a Windows user (I'd really like to switch to Linux, but laziness), I encountered this problem while trying to commit some changes for #236. I implemented this solution, and it worked insofar as I was able to commit to my feature branch in my local repo. Can I submit a PR?
Hi @ThomasLatham, Looks like a suitable solution. Just make sure to submit two PRs
Okay @PierreBresson. By two PRs, are you referring to one for this issue and one for #236? Or two for this issue?
Yes, one for this pr and one for the other
Okay