🔧(react) enforce to use UTC timezone in our test

Currently, the timezone used in test depends to the local environment
that is weird. So we enforce the use of UTC timezone in our tests.
This commit is contained in:
jbpenrath
2023-08-11 15:26:19 +02:00
committed by Jean-Baptiste PENRATH
parent fd7ad8a2f2
commit 944370cc02
3 changed files with 5 additions and 1 deletions

View File

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

View File

@@ -49,6 +49,7 @@ export default defineConfig({
include: ["src/**/*.{ts,tsx}"],
exclude: ["**/*.stories.tsx", "**/*.spec.tsx"],
},
globalSetup: ["src/tests/Global.ts"],
setupFiles: ["src/tests/Setup.ts"],
},
resolve: {

View File

@@ -13823,7 +13823,7 @@ yocto-queue@^1.0.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251"
integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==
yup@^1.2.0:
yup@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/yup/-/yup-1.2.0.tgz#9e51af0c63bdfc9be0fdc6c10aa0710899d8aff6"
integrity sha512-PPqYKSAXjpRCgLgLKVGPA33v5c/WgEx3wi6NFjIiegz90zSwyMpvTFp/uGcVnnbx6to28pgnzp/q8ih3QRjLMQ==