Open
Description
AVA lets you specify environment variables. These are used when starting the worker threads or child processes to run the test files. However when using worker threads, you cannot set the timezone for a specific thread. AVA doesn't officially let you modify the environment of the main process either.
Some options:
- You can set
TZ=Etc/UTC npx ava
but then you need to always invoke AVA that way - You can actually modify the environment, from
ava.config.*
files; but this is not officially part of the configuration API. Still, it could suffice for now - We could add a
mergeEnvironment()
interface to the configuration API to make the above officially supported - We could detect the
TZ
environment variable and apply it to the main process, which goes against AVA's mantra of not magically modifying the test environment - We could add a separate "main process environment variables" configuration