eversport/intl-codegen

Get tests running on Windows

Opened this issue · 0 comments

With github actions we have the possibility now to run on windows, however that fails for two reasons:

  • my local tests on windows fail because my system locale is set to german, but the tests expect a fallback to english
  • tests on CI fail because all the time formatting is expected to be in Europe/Vienna, but the windows host has UTC

On unix, we can easily enforce these via env, like so:

"test": "cross-env LANG=en TZ=Europe/Vienna NODE_ICU_DATA=node_modules/full-icu jest --runInBand --verbose",

However a quick search didn’t yield any useful results of how to make this work on windows. There are ways to set the system language/timezone, which may make this work on CI, but are not a good idea for local development, because you know you want to have isolation…

Also just setting the timezone to UTC would at least solve the problem on CI, but not the locale issue on local. Also, we explicitly want to test for this behavior!