@@ -39,7 +39,7 @@ describe('Data (<bind type>) type support', () => {
39
39
t ( 'int-value' , '123' ) ,
40
40
t ( 'decimal-value' , '45.67' ) ,
41
41
t ( 'geopoint-value' , '38.25146813817506 21.758421137528785 0 0' ) ,
42
- t ( 'date-value' , '1999-11-23 ' ) ,
42
+ t ( 'date-value' , '1999-11-23T23:30:05 ' ) ,
43
43
)
44
44
) ,
45
45
bind ( '/root/string-value' ) . type ( 'string' ) . relevant ( modelNodeRelevanceExpression ) ,
@@ -229,7 +229,7 @@ describe('Data (<bind type>) type support', () => {
229
229
} ) ;
230
230
231
231
it ( 'has a ZonedDateTime | null static type' , ( ) => {
232
- expectTypeOf ( answer . value ) . toEqualTypeOf < Temporal . ZonedDateTime | null > ( ) ;
232
+ expectTypeOf ( answer . value ) . toEqualTypeOf < Temporal . PlainDate | null > ( ) ;
233
233
} ) ;
234
234
235
235
it ( 'has a date populated value' , ( ) => {
@@ -263,7 +263,7 @@ describe('Data (<bind type>) type support', () => {
263
263
t ( 'int-value' , '123' ) ,
264
264
t ( 'decimal-value' , '45.67' ) ,
265
265
t ( 'geopoint-value' , '38.25146813817506 21.758421137528785 1000 25' ) ,
266
- t ( 'date-value' , '2025-12-20T13:45:55 ' ) ,
266
+ t ( 'date-value' , '2025-12-20 ' ) ,
267
267
)
268
268
) ,
269
269
bind ( '/root/string-value' ) . type ( 'string' ) . relevant ( inputRelevanceExpression ) ,
@@ -653,12 +653,12 @@ describe('Data (<bind type>) type support', () => {
653
653
} ) ;
654
654
655
655
it ( 'has a ZonedDateTime | null static type' , ( ) => {
656
- expectTypeOf ( answer . value ) . toEqualTypeOf < Temporal . ZonedDateTime | null > ( ) ;
656
+ expectTypeOf ( answer . value ) . toEqualTypeOf < Temporal . PlainDate | null > ( ) ;
657
657
} ) ;
658
658
659
659
it ( 'has a date populated value' , ( ) => {
660
- expect ( answer . value ) . to . deep . equal ( Temporal . PlainDateTime . from ( '2025-12-20T13:45:55 ' ) ) ;
661
- expect ( answer . stringValue ) . toEqual ( '2025-12-20T13:45:55 ' ) ;
660
+ expect ( answer . value ) . to . deep . equal ( Temporal . PlainDate . from ( '2025-12-20 ' ) ) ;
661
+ expect ( answer . stringValue ) . toEqual ( '2025-12-20 ' ) ;
662
662
} ) ;
663
663
664
664
it ( 'has an null as blank value' , ( ) => {
@@ -668,43 +668,30 @@ describe('Data (<bind type>) type support', () => {
668
668
expect ( answer . stringValue ) . toBe ( '' ) ;
669
669
} ) ;
670
670
671
- it . each ( [ '13:30:55' , '2025-23-23' , 'ZYX' , '2025-03-07T14:30:00+invalid' ] ) (
672
- 'has null when incorrect value is passed' ,
673
- ( expression ) => {
674
- scenario . answer ( '/root/date-value' , expression ) ;
675
- answer = getTypedInputNodeAnswer ( '/root/date-value' , 'date' ) ;
676
- expect ( answer . value ) . toBeNull ( ) ;
677
- expect ( answer . stringValue ) . toBe ( '' ) ;
678
- }
679
- ) ;
671
+ it . each ( [
672
+ '13:30:55' ,
673
+ '2025-23-23' ,
674
+ 'ZYX' ,
675
+ '2025-03-07T14:30:00+invalid' ,
676
+ '2025-03-07T14:30:00-08:00' ,
677
+ '2025-03-07T14:30:00Z' ,
678
+ ] ) ( 'has null when incorrect value is passed' , ( expression ) => {
679
+ scenario . answer ( '/root/date-value' , expression ) ;
680
+ answer = getTypedInputNodeAnswer ( '/root/date-value' , 'date' ) ;
681
+ expect ( answer . value ) . toBeNull ( ) ;
682
+ expect ( answer . stringValue ) . toBe ( '' ) ;
683
+ } ) ;
680
684
681
685
it . each ( [
682
686
{
683
- expression : '2025-03-07' ,
684
- expectedAsObject : Temporal . PlainDate . from ( '2025-03-07' ) ,
685
- expectedAsText : '2025-03-07' ,
686
- } ,
687
- {
688
- expression : '2025-03-07T14:30:00-08:00' ,
689
- expectedAsObject : Temporal . PlainDateTime . from ( '2025-03-07T14:30:00-08:00' ) ,
690
- expectedAsText : '2025-03-07T14:30:00' ,
691
- } ,
692
- {
693
- expression : '2025-03-07T14:30:00-08:00[America/Los_Angeles]' ,
694
- expectedAsObject : Temporal . ZonedDateTime . from (
695
- '2025-03-07T14:30:00-08:00[America/Los_Angeles]'
696
- ) ,
697
- expectedAsText : '2025-03-07T14:30:00-08:00[America/Los_Angeles]' ,
698
- } ,
699
- {
700
- expression : '2025-03-07T14:30:00Z' ,
701
- expectedAsObject : Temporal . ZonedDateTime . from ( '2025-03-07T14:30:00[UTC]' ) ,
702
- expectedAsText : '2025-03-07T14:30:00Z' ,
687
+ expression : '2025-03-14' ,
688
+ expectedAsObject : Temporal . PlainDate . from ( '2025-03-14' ) ,
689
+ expectedAsText : '2025-03-14' ,
703
690
} ,
704
691
{
705
- expression : '2025-03-07T14 :30:00' ,
706
- expectedAsObject : Temporal . PlainDateTime . from ( '2025-03-07T14:30:00 ' ) ,
707
- expectedAsText : '2025-03-07T14:30:00 ' ,
692
+ expression : '2025-12-21T14 :30:00' ,
693
+ expectedAsObject : Temporal . PlainDate . from ( '2025-12-21 ' ) ,
694
+ expectedAsText : '2025-12-21 ' ,
708
695
} ,
709
696
] ) ( 'sets value with valid date' , ( { expression, expectedAsObject, expectedAsText } ) => {
710
697
scenario . answer ( '/root/date-value' , expression ) ;
0 commit comments