Fix TimeZone to be UTC in Jest tests (#7082)

pull/21833/head
Germain 2021-11-04 10:39:49 +00:00 committed by GitHub
parent 558a6204f1
commit 7a203461f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,7 @@
"testMatch": [
"<rootDir>/test/**/*-test.[jt]s?(x)"
],
"globalSetup": "<rootDir>/test/globalSetup.js",
"setupFiles": [
"jest-canvas-mock"
],

3
test/globalSetup.js Normal file
View File

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