chore: fix tests using machine timezone (@fehmer) (#5740)

This commit is contained in:
Christian Fehmer 2024-08-08 12:10:11 +02:00 committed by GitHub
parent c413cbd364
commit 9f9663682d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 1 deletions

View file

@ -2,3 +2,4 @@ backend/dist
backend/__migration__
docker
backend/scripts
**/vitest.config.js

View file

@ -1,5 +1,6 @@
import * as MongoDbMock from "vitest-mongodb";
export async function setup({ provide }): Promise<void> {
export async function setup(): Promise<void> {
process.env.TZ = "UTC";
await MongoDbMock.setup({
serverOptions: {
binary: {

View file

@ -0,0 +1,3 @@
export const setup = () => {
process.env.TZ = "UTC";
};

View file

@ -4,6 +4,7 @@ export default defineConfig({
test: {
globals: true,
environment: "happy-dom",
globalSetup: "__tests__/global-setup.ts",
setupFiles: ["__tests__/setup-tests.ts"],
coverage: {