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

Custom timezone for tests when running from intellij IDEA #37

Open
sankita15 opened this issue Nov 13, 2022 · 0 comments
Open

Custom timezone for tests when running from intellij IDEA #37

sankita15 opened this issue Nov 13, 2022 · 0 comments

Comments

@sankita15
Copy link

I am trying to migrate tests from jest to vitest. For all of my tests I need to use UTC timezone. Currently, I was able to achieve it by TZ=UTC in package.json (refer: vitest-dev/vitest#1575 (comment)).

"scripts": {
    "dev": "vite",
    "serve": "vite preview",
    "build": "vite build",
    "test": "TZ=UTC vitest run",
    "test:watch": "TZ=UTC vitest"
  }

My all the tests pass successfully when I am running the tests from CLI by using npm test. But when it comes to run tests from intellij looks like the tests aren't picking the timezone information from package.json. Is it expected behaviour?

I am using v0.6.6 of vitest runner and IntelliJ IDEA 2022.2.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant