@@ -2,9 +2,11 @@ import { useRegle } from '@regle/core';
2
2
import { required } from '@regle/rules' ;
3
3
import { flushPromises , mount } from '@vue/test-utils' ;
4
4
import { createPinia , defineStore , setActivePinia , skipHydrate , storeToRefs } from 'pinia' ;
5
- import { defineComponent , nextTick , ref } from 'vue' ;
5
+ import { version as piniaVersion } from 'pinia/package.json' ;
6
+ import { defineComponent , nextTick , ref , version } from 'vue' ;
7
+ import { isVueSuperiorOrEqualTo3dotFive } from '../../../packages/core/src/utils' ;
6
8
7
- describe ( '$dispose' , ( ) => {
9
+ describe . runIf ( isVueSuperiorOrEqualTo3dotFive ) ( '$dispose' , ( ) => {
8
10
const useStore = defineStore ( 'store' , ( ) => {
9
11
const { r$ } = useRegle (
10
12
{ name : 'Hello' , nested : { child : '' } , collection : [ { name : '' } ] } ,
@@ -70,7 +72,12 @@ describe('$dispose', () => {
70
72
if ( element . find ( '.compoA' ) . exists ( ) ) {
71
73
element . find ( '.compoA-input' ) . setValue ( 'Boo' ) ;
72
74
}
73
- await nextTick ( ) ;
75
+
76
+ await element . vm . $nextTick ( ) ;
77
+
78
+ if ( element . find ( '.compoA' ) . exists ( ) ) {
79
+ expect ( element . find ( 'input' ) . element . value ) . toBe ( 'Boo' ) ;
80
+ }
74
81
75
82
if ( element . find ( '.compoA' ) . exists ( ) ) {
76
83
expect ( element . find ( '.compoA' ) . text ( ) ) . toBe ( 'Boo' ) ;
0 commit comments