From 7a203461f7dcc89e023c3021cd2d4c3179b7339f Mon Sep 17 00:00:00 2001 From: Germain Date: Thu, 4 Nov 2021 10:39:49 +0000 Subject: [PATCH] Fix TimeZone to be UTC in Jest tests (#7082) --- package.json | 1 + test/globalSetup.js | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 test/globalSetup.js diff --git a/package.json b/package.json index 1a174c48f4..35a8c9c45a 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "testMatch": [ "/test/**/*-test.[jt]s?(x)" ], + "globalSetup": "/test/globalSetup.js", "setupFiles": [ "jest-canvas-mock" ], diff --git a/test/globalSetup.js b/test/globalSetup.js new file mode 100644 index 0000000000..3d1e8924fc --- /dev/null +++ b/test/globalSetup.js @@ -0,0 +1,3 @@ +module.exports = async () => { + process.env.TZ = 'UTC'; +};