1
1
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
3
3
exports [` _Fragment already imported > _Fragment already imported 1` ] = `
4
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode , Fragment as _Fragment2 } from "vue";
5
- import { Fragment as _Fragment } from 'vue';
4
+ "import { Fragment as _Fragment , Fragment as _Fragment2 , createTextVNode as _createTextVNode , createVNode as _createVNode } from 'vue';
6
5
const Root1 = () => _createVNode(_Fragment2, null, [_createTextVNode("root1")]);
7
6
const Root2 = () => _createVNode(_Fragment, null, [_createTextVNode("root2")]);"
8
7
` ;
9
8
10
9
exports [` MereProps Order > MereProps Order 1` ] = `
11
- "import { createVNode as _createVNode , mergeProps as _mergeProps , createTextVNode as _createTextVNode } from "vue";
10
+ "import { createTextVNode as _createTextVNode , mergeProps as _mergeProps , createVNode as _createVNode } from "vue";
12
11
_createVNode("button", _mergeProps({
13
12
" loading" : true
14
13
} , x, {
@@ -30,17 +29,17 @@ createVNode('div', null, ['Without JSX should work']);"
30
29
` ;
31
30
32
31
exports [` Without props > Without props 1` ] = `
33
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
32
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode } from "vue";
34
33
_createVNode("a", null, [_createTextVNode("a")]);"
35
34
` ;
36
35
37
36
exports [` custom directive > custom directive 1` ] = `
38
- "import { withDirectives as _withDirectives , createVNode as _createVNode , resolveDirective as _resolveDirective , resolveComponent as _resolveComponent } from "vue";
37
+ "import { resolveComponent as _resolveComponent , resolveDirective as _resolveDirective , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
39
38
_withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("cus"), x]]);"
40
39
` ;
41
40
42
41
exports [` custom directive > custom directive 2` ] = `
43
- "import { withDirectives as _withDirectives , createVNode as _createVNode , resolveDirective as _resolveDirective , resolveComponent as _resolveComponent , Fragment as _Fragment } from "vue";
42
+ "import { Fragment as _Fragment , resolveComponent as _resolveComponent , resolveDirective as _resolveDirective , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
44
43
_createVNode(_Fragment, null, [_withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x]]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y']]), _withDirectives(_createVNode(_resolveComponent("A"), null, null, 512), [[_resolveDirective("xxx"), x, 'y', {
45
44
a : true ,
46
45
b : true
@@ -57,31 +56,31 @@ _createVNode(_Fragment, null, [_withDirectives(_createVNode(_resolveComponent("A
57
56
` ;
58
57
59
58
exports [` disable object slot syntax with defaultSlot > defaultSlot 1` ] = `
60
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
59
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
61
60
_createVNode(_resolveComponent("Badge"), null, {
62
61
default : () => [slots .default ()],
63
62
_ : 1
64
63
} );"
65
64
` ;
66
65
67
66
exports [` dynamic type in input > dynamic type in input 1` ] = `
68
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelDynamic as _vModelDynamic } from "vue";
67
+ "import { vModelDynamic as _vModelDynamic , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
69
68
_withDirectives(_createVNode("input", {
70
69
" type" : type ,
71
70
" onUpdate:modelValue" : $event => test = $event
72
71
} , null, 8, ["type", "onUpdate:modelValue"]), [[_vModelDynamic, test]]);"
73
72
` ;
74
73
75
74
exports [` input[type="checkbox"] > input[type="checkbox"] 1` ] = `
76
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelCheckbox as _vModelCheckbox } from "vue";
75
+ "import { vModelCheckbox as _vModelCheckbox , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
77
76
_withDirectives(_createVNode("input", {
78
77
" type" : " checkbox" ,
79
78
" onUpdate:modelValue" : $event => test = $event
80
79
} , null, 8, ["onUpdate:modelValue"]), [[_vModelCheckbox, test]]);"
81
80
` ;
82
81
83
82
exports [` input[type="radio"] > input[type="radio"] 1` ] = `
84
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelRadio as _vModelRadio , Fragment as _Fragment } from "vue";
83
+ "import { Fragment as _Fragment , vModelRadio as _vModelRadio , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
85
84
_createVNode(_Fragment, null, [_withDirectives(_createVNode("input", {
86
85
" type" : " radio" ,
87
86
" value" : " 1" ,
@@ -96,7 +95,7 @@ _createVNode(_Fragment, null, [_withDirectives(_createVNode("input", {
96
95
` ;
97
96
98
97
exports [` input[type="text"] .lazy modifier > input[type="text"] .lazy modifier 1` ] = `
99
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelText as _vModelText } from "vue";
98
+ "import { vModelText as _vModelText , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
100
99
_withDirectives(_createVNode("input", {
101
100
" onUpdate:modelValue" : $event => test = $event
102
101
} , null, 8, ["onUpdate:modelValue"]), [[_vModelText, test, void 0, {
@@ -105,31 +104,30 @@ _withDirectives(_createVNode("input", {
105
104
` ;
106
105
107
106
exports [` input[type="text"] > input[type="text"] 1` ] = `
108
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelText as _vModelText } from "vue";
107
+ "import { vModelText as _vModelText , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
109
108
_withDirectives(_createVNode("input", {
110
109
" onUpdate:modelValue" : $event => test = $event
111
110
} , null, 8, ["onUpdate:modelValue"]), [[_vModelText, test]]);"
112
111
` ;
113
112
114
113
exports [` isCustomElement > isCustomElement 1` ] = `
115
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
114
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode } from "vue";
116
115
_createVNode("foo", null, [_createVNode("span", null, [_createTextVNode("foo")])]);"
117
116
` ;
118
117
119
118
exports [` named import specifier \` Keep Alive\` > named import specifier \` Keep Alive\` 1` ] = `
120
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
121
- import { KeepAlive } from 'vue';
119
+ "import { KeepAlive , createTextVNode as _createTextVNode , createVNode as _createVNode } from 'vue';
122
120
_createVNode(KeepAlive, null, [_createTextVNode("123")]);"
123
121
` ;
124
122
125
123
exports [` namespace specifier \` Keep Alive\` > namespace specifier \` Keep Alive\` 1` ] = `
126
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
124
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode } from "vue";
127
125
import * as Vue from 'vue';
128
126
_createVNode(Vue.KeepAlive, null, [_createTextVNode("123")]);"
129
127
` ;
130
128
131
129
exports [` override props multiple > multiple 1` ] = `
132
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
130
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
133
131
_createVNode(_resolveComponent("A"), {
134
132
" loading" : true ,
135
133
... a ,
@@ -148,23 +146,23 @@ _createVNode("div", a, null);"
148
146
` ;
149
147
150
148
exports [` passing object slots via JSX children multiple expressions > multiple expressions 1` ] = `
151
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
149
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
152
150
_createVNode(_resolveComponent("A"), null, {
153
151
default : () => [foo , bar ],
154
152
_ : 1
155
153
} );"
156
154
` ;
157
155
158
156
exports [` passing object slots via JSX children single expression, function expression > single expression, function expression 1` ] = `
159
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
157
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
160
158
_createVNode(_resolveComponent("A"), null, {
161
159
default : () => " foo"
162
160
} );"
163
161
` ;
164
162
165
163
exports [` passing object slots via JSX children single expression, non-literal value: runtime check > single expression, non-literal value: runtime check 1` ] = `
166
- "let _slot ;
167
- import { createVNode as _createVNode , isVNode as _isVNode , resolveComponent as _resolveComponent } from "vue" ;
164
+ "import { resolveComponent as _resolveComponent , isVNode as _isVNode , createVNode as _createVNode } from "vue" ;
165
+ let _slot ;
168
166
function _isSlot(s) {
169
167
return typeof s === ' function' || Object .prototype .toString .call (s ) === ' [object Object]' && ! _isVNode (s );
170
168
}
@@ -176,8 +174,7 @@ _createVNode(_resolveComponent("A"), null, _isSlot(_slot = foo()) ? _slot : {
176
174
` ;
177
175
178
176
exports [` reassign variable as component > reassign variable as component 1` ] = `
179
- "import { isVNode as _isVNode , createVNode as _createVNode } from "vue";
180
- import { defineComponent } from 'vue';
177
+ "import { defineComponent , createVNode as _createVNode , isVNode as _isVNode } from 'vue';
181
178
function _isSlot(s) {
182
179
return typeof s === ' function' || Object .prototype .toString .call (s ) === ' [object Object]' && ! _isVNode (s );
183
180
}
@@ -201,7 +198,7 @@ a = _createVNode(A, null, _isSlot(a) ? a : {
201
198
` ;
202
199
203
200
exports [` select > select 1` ] = `
204
- "import { withDirectives as _withDirectives , vModelSelect as _vModelSelect , createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
201
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode , vModelSelect as _vModelSelect , withDirectives as _withDirectives } from "vue";
205
202
_withDirectives(_createVNode("select", {
206
203
" onUpdate:modelValue" : $event => test = $event
207
204
} , [_createVNode("option", {
@@ -219,25 +216,24 @@ custom("div", null, [_createTextVNode("pragma")]);"
219
216
` ;
220
217
221
218
exports [` should keep \` import * as Vue from "vue"\` > should keep \` import * as Vue from "vue"\` 1` ] = `
222
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
219
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode } from "vue";
223
220
import * as Vue from 'vue';
224
221
_createVNode("div", null, [_createTextVNode("Vue")]);"
225
222
` ;
226
223
227
224
exports [` single no need for a mergeProps call > single no need for a mergeProps call 1` ] = `
228
- "import { createVNode as _createVNode , createTextVNode as _createTextVNode } from "vue";
225
+ "import { createTextVNode as _createTextVNode , createVNode as _createVNode } from "vue";
229
226
_createVNode("div", x, [_createTextVNode("single")], 16);"
230
227
` ;
231
228
232
229
exports [` specifiers should be merged into a single importDeclaration > specifiers should be merged into a single importDeclaration 1` ] = `
233
- "import { createVNode as _createVNode } from "vue";
234
- import { createVNode , Fragment as _Fragment } from 'vue';
230
+ "import { createVNode , Fragment as _Fragment , createVNode as _createVNode } from 'vue';
235
231
import { vShow } from 'vue';
236
232
_createVNode(_Fragment, null, null);"
237
233
` ;
238
234
239
235
exports [` textarea > textarea 1` ] = `
240
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vModelText as _vModelText } from "vue";
236
+ "import { vModelText as _vModelText , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
241
237
_withDirectives(_createVNode("textarea", {
242
238
" onUpdate:modelValue" : $event => test = $event
243
239
} , null, 8, ["onUpdate:modelValue"]), [[_vModelText, test]]);"
@@ -252,20 +248,20 @@ custom("div", {
252
248
` ;
253
249
254
250
exports [` use "model" as the prop name > use "model" as the prop name 1` ] = `
255
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
251
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
256
252
_createVNode(_resolveComponent("C"), {
257
253
" model" : foo ,
258
254
" onUpdate:model" : $event => foo = $event
259
255
} , null, 8, ["model", "onUpdate:model"]);"
260
256
` ;
261
257
262
258
exports [` using v-slots without children should not be spread > using v-slots without children should not be spread 1` ] = `
263
- "import { createVNode as _createVNode , resolveDirective as _resolveDirective , resolveComponent as _resolveComponent } from "vue";
259
+ "import { resolveComponent as _resolveComponent , resolveDirective as _resolveDirective , createVNode as _createVNode } from "vue";
264
260
_createVNode(_resolveComponent("A"), null, slots);"
265
261
` ;
266
262
267
263
exports [` v-model target value support variable > v-model target value support variable 1` ] = `
268
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent , Fragment as _Fragment } from "vue";
264
+ "import { Fragment as _Fragment , resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
269
265
const foo = 'foo';
270
266
const a = () => 'a';
271
267
const b = {
@@ -308,7 +304,7 @@ _createVNode(_Fragment, null, [_createVNode(_resolveComponent("A"), {
308
304
` ;
309
305
310
306
exports [` v-show > v-show 1` ] = `
311
- "import { withDirectives as _withDirectives , createVNode as _createVNode , vShow as _vShow , createTextVNode as _createTextVNode } from "vue";
307
+ "import { createTextVNode as _createTextVNode , vShow as _vShow , createVNode as _createVNode , withDirectives as _withDirectives } from "vue";
312
308
_withDirectives(_createVNode("div", null, [_createTextVNode("vShow")], 512), [[_vShow, x]]);"
313
309
` ;
314
310
@@ -320,7 +316,7 @@ _createVNode("h1", {
320
316
` ;
321
317
322
318
exports [` vModels > vModels 1` ] = `
323
- "import { createVNode as _createVNode , resolveComponent as _resolveComponent } from "vue";
319
+ "import { resolveComponent as _resolveComponent , createVNode as _createVNode } from "vue";
324
320
_createVNode(_resolveComponent("C"), {
325
321
" modelValue" : foo ,
326
322
" modelModifiers" : {
0 commit comments