Fix Jest wrong timezone when run locally (#3029)

This commit is contained in:
Jonatan Witoszek 2023-01-24 10:50:08 +01:00 committed by GitHub
parent 8e09d15522
commit 1b51a978ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -219,6 +219,7 @@
"FLAGS_SERVICE_ENABLED": false, "FLAGS_SERVICE_ENABLED": false,
"FLAGS": {} "FLAGS": {}
}, },
"globalSetup": "<rootDir>/testUtils/globalSetup.ts",
"setupFilesAfterEnv": [ "setupFilesAfterEnv": [
"jest-canvas-mock", "jest-canvas-mock",
"jest-localstorage-mock", "jest-localstorage-mock",

3
testUtils/globalSetup.ts Normal file
View file

@ -0,0 +1,3 @@
module.exports = async function() {
process.env.TZ = "UTC";
};