@@ -11,6 +11,7 @@ const workflows = getWorkflowFilenames(__dirname);
11
11
describe ( 'Execute Wait Node' , ( ) => {
12
12
let timer : NodeJS . Timer ;
13
13
const { clearInterval, setInterval } = global ;
14
+ const nextDay = DateTime . now ( ) . startOf ( 'day' ) . plus ( { days : 1 } ) ;
14
15
15
16
beforeAll ( ( ) => {
16
17
timer = setInterval ( ( ) => jest . advanceTimersByTime ( 1000 ) , 10 ) ;
@@ -25,24 +26,24 @@ describe('Execute Wait Node', () => {
25
26
test . each ( [
26
27
{ value : 'invalid_date' , isValid : false } ,
27
28
{
28
- value : '2025-04-18T10:50:47.560' ,
29
+ value : nextDay . toISO ( ) ,
29
30
isValid : true ,
30
- expectedWaitTill : new Date ( '2025-04-18T10:50:47.560Z' ) ,
31
+ expectedWaitTill : nextDay . toJSDate ( ) ,
31
32
} ,
32
33
{
33
- value : '2025-04-18T10:50:47.560+02:00' ,
34
+ value : nextDay . toISO ( { includeOffset : true } ) ,
34
35
isValid : true ,
35
- expectedWaitTill : new Date ( '2025-04-18T08:50:47.560Z' ) ,
36
+ expectedWaitTill : nextDay . toUTC ( ) . toJSDate ( ) ,
36
37
} ,
37
38
{
38
- value : DateTime . fromISO ( '2025-04-18T10:50:47.560Z' ) . toJSDate ( ) ,
39
+ value : nextDay . toJSDate ( ) ,
39
40
isValid : true ,
40
- expectedWaitTill : new Date ( '2025-04-18T10:50:47.560Z' ) ,
41
+ expectedWaitTill : nextDay . toJSDate ( ) ,
41
42
} ,
42
43
{
43
- value : DateTime . fromISO ( '2025-04-18T10:50:47.560Z' ) ,
44
+ value : nextDay ,
44
45
isValid : true ,
45
- expectedWaitTill : new Date ( '2025-04-18T10:50:47.560Z' ) ,
46
+ expectedWaitTill : nextDay . toJSDate ( ) ,
46
47
} ,
47
48
] ) (
48
49
'Test Wait Node with specificTime $value and isValid $isValid' ,
0 commit comments