Fix Jest wrong timezone when run locally (#3029)
This commit is contained in:
parent
8e09d15522
commit
1b51a978ec
2 changed files with 4 additions and 0 deletions
|
@ -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
3
testUtils/globalSetup.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = async function() {
|
||||||
|
process.env.TZ = "UTC";
|
||||||
|
};
|
Loading…
Reference in a new issue