Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to configure the timezone in the main process #3027

Open
novemberborn opened this issue May 19, 2022 · 0 comments
Open

Option to configure the timezone in the main process #3027

novemberborn opened this issue May 19, 2022 · 0 comments

Comments

@novemberborn
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant