From: 三咲智子 Kevin Deng Date: Wed, 6 Dec 2023 10:52:14 +0000 (+0800) Subject: test: update snapshot X-Git-Tag: v3.6.0-alpha.1~16^2~740 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a10c8a41281934cbecc6c277b573829c1481f002;p=thirdparty%2Fvuejs%2Fcore.git test: update snapshot --- diff --git a/packages/compiler-vapor/__tests__/__snapshots__/compile.test.ts.snap b/packages/compiler-vapor/__tests__/__snapshots__/compile.test.ts.snap index 89b881b4af..c81cd8efb8 100644 --- a/packages/compiler-vapor/__tests__/__snapshots__/compile.test.ts.snap +++ b/packages/compiler-vapor/__tests__/__snapshots__/compile.test.ts.snap @@ -4,7 +4,7 @@ exports[`compile > bindings 1`] = ` "import { template as _template, children as _children, createTextNode as _createTextNode, insert as _insert, effect as _effect, setText as _setText } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
count is .
\\") + const t0 = _template("
count is .
") const n0 = t0() const { 0: [n3, { 1: [n2],}],} = _children(n0) const n1 = _createTextNode(_ctx.count) @@ -20,11 +20,11 @@ exports[`compile > directives > v-bind > simple expression 1`] = ` "import { template as _template, children as _children, effect as _effect, setAttr as _setAttr } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) _effect(() => { - _setAttr(n1, \\"id\\", undefined, _ctx.id) + _setAttr(n1, "id", undefined, _ctx.id) }) return n0 }" @@ -34,7 +34,7 @@ exports[`compile > directives > v-cloak > basic 1`] = ` "import { template as _template } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
test
\\") + const t0 = _template("
test
") const n0 = t0() return n0 }" @@ -44,7 +44,7 @@ exports[`compile > directives > v-html > should raise error and ignore children "import { template as _template, children as _children, effect as _effect, setHtml as _setHtml } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) _effect(() => { @@ -58,10 +58,10 @@ exports[`compile > directives > v-html > should raise error if has no expression "import { template as _template, children as _children, setHtml as _setHtml } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) - _setHtml(n1, undefined, \\"\\") + _setHtml(n1, undefined, "") return n0 }" `; @@ -70,7 +70,7 @@ exports[`compile > directives > v-html > simple expression 1`] = ` "import { template as _template, children as _children, effect as _effect, setHtml as _setHtml } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) _effect(() => { @@ -84,31 +84,31 @@ exports[`compile > directives > v-on > event modifier 1`] = ` "import { template as _template, children as _children, on as _on, withModifiers as _withModifiers, withKeys as _withKeys } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1], 1: [n2], 2: [n3], 3: [n4], 4: [n5], 5: [n6], 6: [n7], 7: [n8], 8: [n9], 9: [n10], 10: [n11], 11: [n12], 12: [n13], 13: [n14], 14: [n15], 15: [n16], 16: [n17], 17: [n18], 18: [n19], 19: [n20], 20: [n21], 21: [n22],} = _children(n0) - _on(n1, \\"click\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"stop\\"])) - _on(n2, \\"submit\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"prevent\\"])) - _on(n3, \\"click\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"stop\\", \\"prevent\\"])) - _on(n4, \\"click\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"self\\"])) - _on(n5, \\"click\\", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { capture: true }) - _on(n6, \\"click\\", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { once: true }) - _on(n7, \\"scroll\\", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { passive: true }) - _on(n8, \\"contextmenu\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"right\\"])) - _on(n9, \\"click\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"left\\"])) - _on(n10, \\"mouseup\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"middle\\"])) - _on(n11, \\"contextmenu\\", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"right\\"])) - _on(n12, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"enter\\"])) - _on(n13, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"tab\\"])) - _on(n14, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"delete\\"])) - _on(n15, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"esc\\"])) - _on(n16, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"space\\"])) - _on(n17, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"up\\"])) - _on(n18, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"down\\"])) - _on(n19, \\"keyup\\", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"left\\"])) - _on(n20, \\"keyup\\", _withModifiers((...args) => (_ctx.submit && _ctx.submit(...args)), [\\"middle\\"])) - _on(n21, \\"keyup\\", _withModifiers((...args) => (_ctx.submit && _ctx.submit(...args)), [\\"middle\\", \\"self\\"])) - _on(n22, \\"keyup\\", _withKeys(_withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), [\\"self\\"]), [\\"enter\\"])) + _on(n1, "click", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["stop"])) + _on(n2, "submit", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["prevent"])) + _on(n3, "click", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["stop", "prevent"])) + _on(n4, "click", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["self"])) + _on(n5, "click", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { capture: true }) + _on(n6, "click", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { once: true }) + _on(n7, "scroll", (...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), { passive: true }) + _on(n8, "contextmenu", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["right"])) + _on(n9, "click", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["left"])) + _on(n10, "mouseup", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["middle"])) + _on(n11, "contextmenu", _withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["right"])) + _on(n12, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["enter"])) + _on(n13, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["tab"])) + _on(n14, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["delete"])) + _on(n15, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["esc"])) + _on(n16, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["space"])) + _on(n17, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["up"])) + _on(n18, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["down"])) + _on(n19, "keyup", _withKeys((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["left"])) + _on(n20, "keyup", _withModifiers((...args) => (_ctx.submit && _ctx.submit(...args)), ["middle"])) + _on(n21, "keyup", _withModifiers((...args) => (_ctx.submit && _ctx.submit(...args)), ["middle", "self"])) + _on(n22, "keyup", _withKeys(_withModifiers((...args) => (_ctx.handleEvent && _ctx.handleEvent(...args)), ["self"]), ["enter"])) return n0 }" `; @@ -117,10 +117,10 @@ exports[`compile > directives > v-on > simple expression 1`] = ` "import { template as _template, children as _children, on as _on } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) - _on(n1, \\"click\\", (...args) => (_ctx.handleClick && _ctx.handleClick(...args))) + _on(n1, "click", (...args) => (_ctx.handleClick && _ctx.handleClick(...args))) return n0 }" `; @@ -129,10 +129,10 @@ exports[`compile > directives > v-once > as root node 1`] = ` "import { template as _template, children as _children, setAttr as _setAttr } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) - _setAttr(n1, \\"id\\", undefined, _ctx.foo) + _setAttr(n1, "id", undefined, _ctx.foo) return n0 }" `; @@ -141,12 +141,12 @@ exports[`compile > directives > v-once > basic 1`] = ` "import { template as _template, children as _children, createTextNode as _createTextNode, setText as _setText, setAttr as _setAttr, prepend as _prepend } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n3, { 1: [n2],}],} = _children(n0) const n1 = _createTextNode(_ctx.msg) _setText(n1, undefined, _ctx.msg) - _setAttr(n2, \\"class\\", undefined, _ctx.clz) + _setAttr(n2, "class", undefined, _ctx.clz) _prepend(n3, n1) return n0 }" @@ -156,7 +156,7 @@ exports[`compile > directives > v-pre > basic 1`] = ` "import { template as _template } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
{{ bar }}
\\") + const t0 = _template("
{{ bar }}
") const n0 = t0() return n0 }" @@ -166,7 +166,7 @@ exports[`compile > directives > v-pre > self-closing v-pre 1`] = ` "import { template as _template, children as _children, createTextNode as _createTextNode, append as _append, effect as _effect, setText as _setText, setAttr as _setAttr } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 1: [n2],} = _children(n0) const n1 = _createTextNode(_ctx.bar) @@ -175,7 +175,7 @@ export function render(_ctx) { _setText(n1, undefined, _ctx.bar) }) _effect(() => { - _setAttr(n2, \\"id\\", undefined, _ctx.foo) + _setAttr(n2, "id", undefined, _ctx.foo) }) return n0 }" @@ -185,7 +185,7 @@ exports[`compile > directives > v-pre > should not affect siblings after it 1`] "import { template as _template, children as _children, createTextNode as _createTextNode, append as _append, effect as _effect, setText as _setText, setAttr as _setAttr } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
{{ bar }}
\\") + const t0 = _template("
{{ bar }}
") const n0 = t0() const { 1: [n2],} = _children(n0) const n1 = _createTextNode(_ctx.bar) @@ -194,7 +194,7 @@ export function render(_ctx) { _setText(n1, undefined, _ctx.bar) }) _effect(() => { - _setAttr(n2, \\"id\\", undefined, _ctx.foo) + _setAttr(n2, "id", undefined, _ctx.foo) }) return n0 }" @@ -204,10 +204,10 @@ exports[`compile > directives > v-text > no expression 1`] = ` "import { template as _template, children as _children, setText as _setText } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) - _setText(n1, undefined, \\"\\") + _setText(n1, undefined, "") return n0 }" `; @@ -216,7 +216,7 @@ exports[`compile > directives > v-text > simple expression 1`] = ` "import { template as _template, children as _children, effect as _effect, setText as _setText } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"
\\") + const t0 = _template("
") const n0 = t0() const { 0: [n1],} = _children(n0) _effect(() => { @@ -250,7 +250,7 @@ exports[`compile > dynamic root nodes and interpolation 1`] = ` "import { template as _template, children as _children, createTextNode as _createTextNode, prepend as _prepend, insert as _insert, append as _append, on as _on, effect as _effect, setText as _setText, setAttr as _setAttr } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"\\") + const t0 = _template("") const n0 = t0() const { 0: [n4, { 1: [n5],}],} = _children(n0) const n1 = _createTextNode(_ctx.count) @@ -259,7 +259,7 @@ export function render(_ctx) { _prepend(n4, n1) _insert(n2, n4, n5) _append(n4, n3) - _on(n4, \\"click\\", (...args) => (_ctx.handleClick && _ctx.handleClick(...args))) + _on(n4, "click", (...args) => (_ctx.handleClick && _ctx.handleClick(...args))) _effect(() => { _setText(n1, undefined, _ctx.count) }) @@ -270,7 +270,7 @@ export function render(_ctx) { _setText(n3, undefined, _ctx.count) }) _effect(() => { - _setAttr(n4, \\"id\\", undefined, _ctx.count) + _setAttr(n4, "id", undefined, _ctx.count) }) return n0 }" @@ -280,7 +280,7 @@ exports[`compile > fragment 1`] = ` "import { template as _template } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"

\\") + const t0 = _template("

") const n0 = t0() return n0 }" @@ -290,7 +290,7 @@ exports[`compile > static + dynamic root 1`] = ` "import { template as _template, children as _children, createTextNode as _createTextNode, prepend as _prepend, insert as _insert, append as _append, effect as _effect, setText as _setText } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"369\\") + const t0 = _template("369") const n0 = t0() const { 1: [n9], 3: [n10],} = _children(n0) const n1 = _createTextNode(1) @@ -337,7 +337,7 @@ exports[`compile > static template 1`] = ` "import { template as _template } from 'vue/vapor'; export function render(_ctx) { - const t0 = _template(\\"

hello

\\") + const t0 = _template("

hello

") const n0 = t0() return n0 }" diff --git a/packages/compiler-vapor/__tests__/__snapshots__/fixtures.test.ts.snap b/packages/compiler-vapor/__tests__/__snapshots__/fixtures.test.ts.snap index c8ddd09786..001b319876 100644 --- a/packages/compiler-vapor/__tests__/__snapshots__/fixtures.test.ts.snap +++ b/packages/compiler-vapor/__tests__/__snapshots__/fixtures.test.ts.snap @@ -16,14 +16,14 @@ const increment = () => count.value++ return (() => { - const t0 = _template(\\"

Counter

Count:

Double:

once:

{{ count }}

\\") + const t0 = _template("

Counter

Count:

Double:

once:

{{ count }}

") const n0 = t0() const { 1: [n2], 2: [n4], 3: [n5], 4: [n6], 6: [n8],} = _children(n0) const n1 = _createTextNode(count.value) _append(n2, n1) const n3 = _createTextNode(double.value) _append(n4, n3) - _on(n5, \\"click\\", (...args) => (increment && increment(...args))) + _on(n5, "click", (...args) => (increment && increment(...args))) const n7 = _createTextNode(count.value) _setText(n7, undefined, count.value) _append(n8, n7)