File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/pluggableWidgets/calendar-web/src/__tests__ Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ import { ListValueBuilder } from "@mendix/widget-plugin-test-utils";
4
4
5
5
import Calendar from "../Calendar" ;
6
6
import { CalendarContainerProps } from "../../typings/CalendarProps" ;
7
+
8
+ // We capture any existing value, switch to UTC, and restore the original value
9
+ // when the suite finishes.
10
+
11
+ const ORIGINAL_TZ = process . env . TZ ;
12
+ process . env . TZ = "UTC" ;
13
+
7
14
const customViewProps : CalendarContainerProps = {
8
15
name : "calendar-test" ,
9
16
class : "calendar-class" ,
@@ -49,6 +56,10 @@ beforeAll(() => {
49
56
50
57
afterAll ( ( ) => {
51
58
jest . useRealTimers ( ) ;
59
+
60
+ // Restore whatever time-zone the process was originally using so other
61
+ // test files are unaffected.
62
+ process . env . TZ = ORIGINAL_TZ ;
52
63
} ) ;
53
64
54
65
describe ( "Calendar" , ( ) => {
You can’t perform that action at this time.
0 commit comments