|
@@ -1,7 +1,8 @@
|
|
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
|
|
|
|
|
|
exports[`compile > bindings 1`] = `
|
|
exports[`compile > bindings 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div>count is <!>.</div>\\")
|
|
const t0 = _template(\\"<div>count is <!>.</div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n3, { 1: [n2],}],} = _children(n0)
|
|
const { 0: [n3, { 1: [n2],}],} = _children(n0)
|
|
@@ -18,7 +19,8 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-bind > simple expression 1`] = `
|
|
exports[`compile > directives > v-bind > simple expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -33,22 +35,22 @@ import { template as _template, children as _children, effect as _effect, setAtt
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-html > no expression 1`] = `
|
|
exports[`compile > directives > v-html > no expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
|
- _effect(() => {
|
|
|
|
|
- _setHtml(n1, undefined, \\"\\")
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ _setHtml(n1, undefined, \\"\\")
|
|
|
return n0
|
|
return n0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-import { template as _template, children as _children, effect as _effect, setHtml as _setHtml } from 'vue/vapor'
|
|
|
|
|
|
|
+import { template as _template, children as _children, setHtml as _setHtml } from 'vue/vapor'
|
|
|
"
|
|
"
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-html > simple expression 1`] = `
|
|
exports[`compile > directives > v-html > simple expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -63,7 +65,8 @@ import { template as _template, children as _children, effect as _effect, setHtm
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-on > event modifier 1`] = `
|
|
exports[`compile > directives > v-on > event modifier 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -78,7 +81,8 @@ import { template as _template, children as _children, effect as _effect, withMo
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-on > simple expression 1`] = `
|
|
exports[`compile > directives > v-on > simple expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -93,7 +97,8 @@ import { template as _template, children as _children, effect as _effect, on as
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-once > as root node 1`] = `
|
|
exports[`compile > directives > v-once > as root node 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -106,7 +111,8 @@ import { template as _template, children as _children, setAttr as _setAttr } fro
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-once > basic 1`] = `
|
|
exports[`compile > directives > v-once > basic 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div> <span></span></div>\\")
|
|
const t0 = _template(\\"<div> <span></span></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n3, { 1: [n2],}],} = _children(n0)
|
|
const { 0: [n3, { 1: [n2],}],} = _children(n0)
|
|
@@ -122,7 +128,8 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-pre > basic 1`] = `
|
|
exports[`compile > directives > v-pre > basic 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div :id=\\\\\\"foo\\\\\\"><Comp></Comp>{{ bar }}</div>\\")
|
|
const t0 = _template(\\"<div :id=\\\\\\"foo\\\\\\"><Comp></Comp>{{ bar }}</div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
return n0
|
|
return n0
|
|
@@ -133,7 +140,8 @@ import { template as _template } from 'vue/vapor'
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-pre > self-closing v-pre 1`] = `
|
|
exports[`compile > directives > v-pre > self-closing v-pre 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div><div><Comp></Comp></div>\\")
|
|
const t0 = _template(\\"<div></div><div><Comp></Comp></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 1: [n1],} = _children(n0)
|
|
const { 1: [n1],} = _children(n0)
|
|
@@ -153,7 +161,8 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-pre > should not affect siblings after it 1`] = `
|
|
exports[`compile > directives > v-pre > should not affect siblings after it 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div :id=\\\\\\"foo\\\\\\"><Comp></Comp>{{ bar }}</div><div><Comp></Comp></div>\\")
|
|
const t0 = _template(\\"<div :id=\\\\\\"foo\\\\\\"><Comp></Comp>{{ bar }}</div><div><Comp></Comp></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 1: [n1],} = _children(n0)
|
|
const { 1: [n1],} = _children(n0)
|
|
@@ -173,22 +182,22 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-text > no expression 1`] = `
|
|
exports[`compile > directives > v-text > no expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
|
- _effect(() => {
|
|
|
|
|
- _setText(n1, undefined, \\"\\")
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ _setText(n1, undefined, \\"\\")
|
|
|
return n0
|
|
return n0
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-import { template as _template, children as _children, effect as _effect, setText as _setText } from 'vue/vapor'
|
|
|
|
|
|
|
+import { template as _template, children as _children, setText as _setText } from 'vue/vapor'
|
|
|
"
|
|
"
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > directives > v-text > simple expression 1`] = `
|
|
exports[`compile > directives > v-text > simple expression 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div></div>\\")
|
|
const t0 = _template(\\"<div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1],} = _children(n0)
|
|
const { 0: [n1],} = _children(n0)
|
|
@@ -203,7 +212,8 @@ import { template as _template, children as _children, effect as _effect, setTex
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > dynamic root 1`] = `
|
|
exports[`compile > dynamic root 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _fragment()
|
|
const t0 = _fragment()
|
|
|
|
|
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
@@ -224,7 +234,8 @@ import { fragment as _fragment, createTextNode as _createTextNode, append as _ap
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > dynamic root nodes and interpolation 1`] = `
|
|
exports[`compile > dynamic root nodes and interpolation 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<button>foo<!>foo</button>\\")
|
|
const t0 = _template(\\"<button>foo<!>foo</button>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 0: [n1, { 1: [n5],}],} = _children(n0)
|
|
const { 0: [n1, { 1: [n5],}],} = _children(n0)
|
|
@@ -239,8 +250,14 @@ exports[`compile > dynamic root nodes and interpolation 1`] = `
|
|
|
})
|
|
})
|
|
|
_effect(() => {
|
|
_effect(() => {
|
|
|
_setAttr(n1, \\"id\\", undefined, count)
|
|
_setAttr(n1, \\"id\\", undefined, count)
|
|
|
|
|
+ })
|
|
|
|
|
+ _effect(() => {
|
|
|
_setText(n2, undefined, count)
|
|
_setText(n2, undefined, count)
|
|
|
|
|
+ })
|
|
|
|
|
+ _effect(() => {
|
|
|
_setText(n3, undefined, count)
|
|
_setText(n3, undefined, count)
|
|
|
|
|
+ })
|
|
|
|
|
+ _effect(() => {
|
|
|
_setText(n4, undefined, count)
|
|
_setText(n4, undefined, count)
|
|
|
})
|
|
})
|
|
|
return n0
|
|
return n0
|
|
@@ -251,7 +268,8 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > fragment 1`] = `
|
|
exports[`compile > fragment 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<p></p><span></span><div></div>\\")
|
|
const t0 = _template(\\"<p></p><span></span><div></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
return n0
|
|
return n0
|
|
@@ -262,7 +280,8 @@ import { template as _template } from 'vue/vapor'
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > static + dynamic root 1`] = `
|
|
exports[`compile > static + dynamic root 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"3<!>6<!>9\\")
|
|
const t0 = _template(\\"3<!>6<!>9\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
const { 1: [n9], 3: [n10],} = _children(n0)
|
|
const { 1: [n9], 3: [n10],} = _children(n0)
|
|
@@ -310,7 +329,8 @@ import { template as _template, children as _children, createTextNode as _create
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
|
exports[`compile > static template 1`] = `
|
|
exports[`compile > static template 1`] = `
|
|
|
-"export function render(_ctx) {
|
|
|
|
|
|
|
+"
|
|
|
|
|
+export function render(_ctx) {
|
|
|
const t0 = _template(\\"<div><p>hello</p><input><span></span></div>\\")
|
|
const t0 = _template(\\"<div><p>hello</p><input><span></span></div>\\")
|
|
|
const n0 = t0()
|
|
const n0 = t0()
|
|
|
return n0
|
|
return n0
|