nmf-app icon indicating copy to clipboard operation
nmf-app copied to clipboard

Fix `yarn test` on Windows

Open adamfitzgibbon opened this issue 4 years ago • 1 comments

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.

adamfitzgibbon avatar Oct 11 '20 02:10 adamfitzgibbon

https://github.com/NMF-earth/nmf-app/pull/210 could be a solution, but we need a proper research on the side effects

PierreBresson avatar Oct 25 '20 18:10 PierreBresson

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?

ThomasLatham avatar Dec 21 '22 17:12 ThomasLatham

Hi @ThomasLatham, Looks like a suitable solution. Just make sure to submit two PRs

PierreBresson avatar Dec 22 '22 09:12 PierreBresson

Okay @PierreBresson. By two PRs, are you referring to one for this issue and one for #236? Or two for this issue?

ThomasLatham avatar Dec 22 '22 21:12 ThomasLatham

Yes, one for this pr and one for the other

PierreBresson avatar Dec 22 '22 21:12 PierreBresson

Okay

ThomasLatham avatar Dec 22 '22 21:12 ThomasLatham