As documented in #202, the command "TZ=" does not work in Windows (although it does work in MacOS and Linux), so tests would fail in Windows environments on account of an unrecognized command. This PR fixes the problem by instead setting the the timezone environment variable in a global-setup JavaScript file for Jest, thereby making such an action OS independent.
Note: According to the source for this fix, "The normal setupFiles did not work for me, since they run too late (jest: ^23.5.0). So it is mandatory to use the globalSetup file."
👇 Click on the image for a new way to code review
- Make big changes easier — review code in small groups of related files
- Know where to start — see the whole change at a glance
- Take a code tour — explore the change with an interactive tour
- Make comments and review — all fully sync’ed with github
[Try it now!](https://app.codesee.io/r/reviews?pr=364&src=https%3A%2F%2Fgithub.com%2FNMF-earth%2Fnmf-app)
✅ I have read the contributing file
Summary
As documented in #202, the command "TZ=" does not work in Windows (although it does work in MacOS and Linux), so tests would fail in Windows environments on account of an unrecognized command. This PR fixes the problem by instead setting the the timezone environment variable in a global-setup JavaScript file for Jest, thereby making such an action OS independent.
Note: According to the source for this fix, "The normal setupFiles did not work for me, since they run too late (jest: ^23.5.0). So it is mandatory to use the globalSetup file."