@@ -78,14 +78,38 @@ describe("util/schedule", () => {
78
78
} ) ;
79
79
80
80
describe ( "quietHoursDisplay" , ( ) => {
81
- const quietHoursStart = quietHoursDisplay (
82
- "00:00" ,
83
- "Australia/Sydney" ,
84
- new Date ( "2023-09-06T15:00:00.000+10:00" ) ,
85
- ) ;
81
+ it ( "midnight" , ( ) => {
82
+ const quietHoursStart = quietHoursDisplay (
83
+ "00:00" ,
84
+ "Australia/Sydney" ,
85
+ new Date ( "2023-09-06T15:00:00.000+10:00" ) ,
86
+ ) ;
87
+
88
+ expect ( quietHoursStart ) . toBe (
89
+ "00:00 tomorrow (in 9 hours) in Australia/Sydney" ,
90
+ ) ;
91
+ } ) ;
92
+ it ( "five o'clock today" , ( ) => {
93
+ const quietHoursStart = quietHoursDisplay (
94
+ "17:00" ,
95
+ "Europe/London" ,
96
+ new Date ( "2023-09-06T15:00:00.000+10:00" ) ,
97
+ ) ;
86
98
87
- expect ( quietHoursStart ) . toBe (
88
- "12:00AM tomorrow (in 9 hours) in Australia/Sydney" ,
89
- ) ;
99
+ expect ( quietHoursStart ) . toBe (
100
+ "17:00 today (in 11 hours) in Europe/London" ,
101
+ ) ;
102
+ } ) ;
103
+ it ( "lunch tomorrow" , ( ) => {
104
+ const quietHoursStart = quietHoursDisplay (
105
+ "13:00" ,
106
+ "US/Central" ,
107
+ new Date ( "2023-09-06T08:00:00.000+10:00" ) ,
108
+ ) ;
109
+
110
+ expect ( quietHoursStart ) . toBe (
111
+ "13:00 tomorrow (in 20 hours) in US/Central" ,
112
+ ) ;
113
+ } ) ;
90
114
} ) ;
91
115
} ) ;
0 commit comments