@@ -10,8 +10,7 @@ describe('defineModel()', () => {
10
10
const c = defineModel('count')
11
11
const toString = defineModel('toString', { type: Function })
12
12
</script>
13
- ` ,
14
- { defineModel : true }
13
+ `
15
14
)
16
15
assertCode ( content )
17
16
expect ( content ) . toMatch ( 'props: {' )
@@ -44,8 +43,7 @@ describe('defineModel()', () => {
44
43
defineEmits(['change'])
45
44
const count = defineModel({ default: 0 })
46
45
</script>
47
- ` ,
48
- { defineModel : true }
46
+ `
49
47
)
50
48
assertCode ( content )
51
49
expect ( content ) . toMatch ( `props: /*#__PURE__*/_mergeModels({ foo: String }` )
@@ -66,8 +64,7 @@ describe('defineModel()', () => {
66
64
defineProps(['foo', 'bar'])
67
65
const count = defineModel('count')
68
66
</script>
69
- ` ,
70
- { defineModel : true }
67
+ `
71
68
)
72
69
assertCode ( content )
73
70
expect ( content ) . toMatch ( `props: /*#__PURE__*/_mergeModels(['foo', 'bar'], {
@@ -94,8 +91,7 @@ describe('defineModel()', () => {
94
91
95
92
const local = true
96
93
const hoist = defineModel('hoist', { local })
97
- </script>` ,
98
- { defineModel : true }
94
+ </script>`
99
95
)
100
96
assertCode ( content )
101
97
expect ( content ) . toMatch ( `_useModel(__props, "modelValue", { local: true })` )
@@ -115,8 +111,7 @@ describe('defineModel()', () => {
115
111
const disabled = defineModel<number>('disabled', { required: false })
116
112
const any = defineModel<any | boolean>('any')
117
113
</script>
118
- ` ,
119
- { defineModel : true }
114
+ `
120
115
)
121
116
assertCode ( content )
122
117
expect ( content ) . toMatch ( '"modelValue": { type: [Boolean, String] }' )
@@ -155,7 +150,7 @@ describe('defineModel()', () => {
155
150
const optional = defineModel<string>('optional', { required: false })
156
151
</script>
157
152
` ,
158
- { defineModel : true , isProd : true }
153
+ { isProd : true }
159
154
)
160
155
assertCode ( content )
161
156
expect ( content ) . toMatch ( '"modelValue": { type: Boolean }' )
0 commit comments