@@ -8,7 +8,7 @@ test('test VueCron', async () => {
8
8
9
9
const wrapper = mount ( VueCron , {
10
10
props : {
11
- value : '*/15 12 * * *'
11
+ modelValue : '*/15 12 * * *'
12
12
} ,
13
13
slots : {
14
14
default : function ( p ) {
@@ -19,16 +19,16 @@ test('test VueCron', async () => {
19
19
20
20
await wrapper . vm . $nextTick ( )
21
21
22
- expect ( slotProps . fields [ 4 ] . attrs . value ) . toEqual ( [ 0 , 15 , 30 , 45 ] )
23
- expect ( slotProps . fields [ 3 ] . attrs . value ) . toEqual ( [ 12 ] )
24
- expect ( slotProps . fields [ 2 ] . attrs . value ) . toEqual ( [ ] )
25
- expect ( slotProps . fields [ 1 ] . attrs . value ) . toEqual ( [ ] )
26
- expect ( slotProps . fields [ 0 ] . attrs . value ) . toEqual ( [ ] )
22
+ expect ( slotProps . fields [ 4 ] . attrs . modelValue ) . toEqual ( [ 0 , 15 , 30 , 45 ] )
23
+ expect ( slotProps . fields [ 3 ] . attrs . modelValue ) . toEqual ( [ 12 ] )
24
+ expect ( slotProps . fields [ 2 ] . attrs . modelValue ) . toEqual ( [ ] )
25
+ expect ( slotProps . fields [ 1 ] . attrs . modelValue ) . toEqual ( [ ] )
26
+ expect ( slotProps . fields [ 0 ] . attrs . modelValue ) . toEqual ( [ ] )
27
27
28
- slotProps . fields [ 4 ] . events . input ( [ 1 , 2 , 3 , 4 , 5 ] )
28
+ slotProps . fields [ 4 ] . events [ 'update:model-value' ] ( [ 1 , 2 , 3 , 4 , 5 ] )
29
29
30
30
await wrapper . vm . $nextTick ( )
31
31
32
- expect ( wrapper . emitted ( ) ) . toHaveProperty ( 'update:value' )
33
- expect ( wrapper . emitted ( 'update:value' ) [ 0 ] ) . toEqual ( [ '1-5 12 * * *' ] )
32
+ expect ( wrapper . emitted ( ) ) . toHaveProperty ( 'update:model- value' )
33
+ expect ( wrapper . emitted ( 'update:model- value' ) [ 0 ] ) . toEqual ( [ '1-5 12 * * *' ] )
34
34
} )
0 commit comments