mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Setting global UTC timezone for tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
194370e020
commit
1a3f7ddd02
3 files changed
+25
-1
No files matched your search
+2
-1
@@ -76,7 +76,8 @@
|
|||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"isolatedModules": true
|
"isolatedModules": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"globalSetup": "<rootDir>/src/jest.timezone.ts"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"generateUpdatesFilesForAllChannels": true,
|
"generateUpdatesFilesForAllChannels": true,
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
describe("Timezones", () => {
|
||||||
|
it("should always be UTC", () => {
|
||||||
|
expect(new Date().getTimezoneOffset()).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
export {};
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Setting the timezone to UTC to ensure same timezone for CI and local environments
|
||||||
|
module.exports = async () => {
|
||||||
|
process.env.TZ = "UTC";
|
||||||
|
};
|
||||||
|
|
||||||
|
export {};
|
||||||
Reference in new issue
Block a user