From 6233125d2d8d6a5036f82b6475d8eca5f8e7b329 Mon Sep 17 00:00:00 2001 From: daiwei Date: Fri, 8 Aug 2025 16:10:20 +0800 Subject: [PATCH] test: update snap --- .../__snapshots__/compile.spec.ts.snap | 8 ++++---- .../__snapshots__/expression.spec.ts.snap | 4 ++-- .../transformChildren.spec.ts.snap | 12 +++++------ .../__snapshots__/vFor.spec.ts.snap | 20 +++++++++---------- .../transforms/__snapshots__/vIf.spec.ts.snap | 6 +++--- .../__snapshots__/vText.spec.ts.snap | 4 ++-- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/compiler-vapor/__tests__/__snapshots__/compile.spec.ts.snap b/packages/compiler-vapor/__tests__/__snapshots__/compile.spec.ts.snap index f1682eaef4..a6b13b9de5 100644 --- a/packages/compiler-vapor/__tests__/__snapshots__/compile.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/__snapshots__/compile.spec.ts.snap @@ -6,7 +6,7 @@ const t0 = _template("
", true) export function render(_ctx, $props, $emit, $attrs, $slots) { const n0 = t0() - const x0 = _child(n0) + const x0 = _child(n0, -1) _renderEffect(() => _setText(x0, "count is " + _toDisplayString(_ctx.count) + ".")) return n0 }" @@ -186,7 +186,7 @@ _delegateEvents("click") export function render(_ctx) { const n0 = t0() - const x0 = _child(n0) + const x0 = _child(n0, -1) n0.$evtclick = e => _ctx.handleClick(e) _renderEffect(() => { const _count = _ctx.count @@ -203,7 +203,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = t0() - const x0 = _child(n0) + const x0 = _child(n0, -1) _renderEffect(() => { _setProp(n0, "id", _ctx.foo) _setText(x0, _toDisplayString(_ctx.bar)) @@ -237,7 +237,7 @@ export function render(_ctx) { const n0 = _child(n3) const n1 = _next(n0) const n2 = _nthChild(n3, 3) - const x0 = _child(n0) + const x0 = _child(n0, -1) _setText(x0, _toDisplayString(_ctx.foo)) _renderEffect(() => { _setText(n1, " " + _toDisplayString(_ctx.bar)) diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/expression.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/expression.spec.ts.snap index fda0121d63..a206b19015 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/expression.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/expression.spec.ts.snap @@ -48,7 +48,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n1 = t0() const n0 = _child(n1) - const x1 = _child(n1) + const x1 = _child(n1, -1) _renderEffect(() => { const _foo = _ctx.foo _setText(n0, _toDisplayString(_foo)) @@ -87,7 +87,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n1 = t0() const n0 = _child(n1) - const x1 = _child(n1) + const x1 = _child(n1, -1) _renderEffect(() => { const _String = String const _foo = _ctx.foo diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/transformChildren.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/transformChildren.spec.ts.snap index 6a353b771f..134f187731 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/transformChildren.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/transformChildren.spec.ts.snap @@ -26,8 +26,8 @@ export function render(_ctx) { const n0 = _child(n3) const n1 = _next(n0) const n2 = _next(n1) - const x0 = _child(n0) - const x2 = _child(n2) + const x0 = _child(n0, -1) + const x2 = _child(n2, -1) _renderEffect(() => { _setText(x0, _toDisplayString(_ctx.first)) _setText(n1, " " + _toDisplayString(_ctx.second) + " " + _toDisplayString(_ctx.third) + " ") @@ -44,7 +44,7 @@ const t0 = _template("
x
x
", true) export function render(_ctx) { const n1 = t0() const n0 = _nthChild(n1, 2) - const x0 = _child(n0) + const x0 = _child(n0, -1) _renderEffect(() => _setText(x0, _toDisplayString(_ctx.msg))) return n1 }" @@ -62,9 +62,9 @@ export function render(_ctx) { const n1 = _child(p1) const p2 = _next(p1) const n2 = _child(p2) - const x0 = _child(n0) - const x1 = _child(n1) - const x2 = _child(n2) + const x0 = _child(n0, -1) + const x1 = _child(n1, -1) + const x2 = _child(n2, -1) _renderEffect(() => { const _msg = _ctx.msg _setText(x0, _toDisplayString(_msg)) diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap index 69c695a246..09329d2e9c 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vFor.spec.ts.snap @@ -7,7 +7,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.list), (_for_item0, _for_key0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value[0] + _for_item0.value.slice(1) + _for_key0.value))) return n2 }, ([id, ...other], index) => (id)) @@ -22,7 +22,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.list), (_for_item0, _for_key0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value[0] + _for_item0.value[1] + _for_key0.value))) return n2 }, ([id, other], index) => (id)) @@ -38,7 +38,7 @@ _delegateEvents("click") export function render(_ctx) { const n0 = _createFor(() => (_ctx.items), (_for_item0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) n2.$evtclick = () => (_ctx.remove(_for_item0.value)) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value))) return n2 @@ -54,7 +54,7 @@ const t0 = _template(" ", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _setText(x2, _toDisplayString(_for_item0.value.id + _for_item0.value.id)) return n2 }, (row) => (row.id)) @@ -90,7 +90,7 @@ export function render(_ctx) { _setInsertionState(n5) const n2 = _createFor(() => (_for_item0.value), (_for_item1) => { const n4 = t0() - const x4 = _child(n4) + const x4 = _child(n4, -1) _renderEffect(() => _setText(x4, _toDisplayString(_for_item1.value+_for_item0.value))) return n4 }, undefined, 1) @@ -107,7 +107,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.list), (_for_item0, _for_key0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value.id + _getRestElement(_for_item0.value, ["id"]) + _for_key0.value))) return n2 }, ({ id, ...other }, index) => (id)) @@ -122,7 +122,7 @@ const t0 = _template(" ", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.items), (_for_item0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value.id) + _toDisplayString(_for_item0.value.value))) return n2 }, ({ id, value }) => (id)) @@ -137,7 +137,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.list), (_for_item0, _for_key0, _for_index0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_for_item0.value + _for_key0.value + _for_index0.value))) return n2 }, (value, key, index) => (key)) @@ -153,7 +153,7 @@ export function render(_ctx) { let _selector0_0 const n0 = _createFor(() => (_ctx.rows), (_for_item0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _selector0_0(() => { _setText(x2, _toDisplayString(_ctx.selected === _for_item0.value.id ? 'danger' : '')) }) @@ -227,7 +227,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createFor(() => (_ctx.list), (_for_item0) => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_getDefaultValue(_for_item0.value.foo, _ctx.bar) + _ctx.bar + _ctx.baz + _getDefaultValue(_for_item0.value.baz[0], _ctx.quux) + _ctx.quux))) return n2 }) diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vIf.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vIf.spec.ts.snap index fbf7f18837..f718fe9394 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vIf.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vIf.spec.ts.snap @@ -7,7 +7,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = _createIf(() => (_ctx.ok), () => { const n2 = t0() - const x2 = _child(n2) + const x2 = _child(n2, -1) _renderEffect(() => _setText(x2, _toDisplayString(_ctx.msg))) return n2 }) @@ -38,7 +38,7 @@ export function render(_ctx) { return [n10, n11] }, null, true)) const n13 = t5() - const x13 = _child(n13) + const x13 = _child(n13, -1) _renderEffect(() => _setText(x13, _toDisplayString(_ctx.text))) return [n0, n13] }" @@ -72,7 +72,7 @@ export function render(_ctx) { const n2 = t0() const n3 = t1() const n4 = t2() - const x4 = _child(n4) + const x4 = _child(n4, -1) _renderEffect(() => _setText(x4, _toDisplayString(_ctx.msg))) return [n2, n3, n4] }) diff --git a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vText.spec.ts.snap b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vText.spec.ts.snap index b17692a981..7792a03cb9 100644 --- a/packages/compiler-vapor/__tests__/transforms/__snapshots__/vText.spec.ts.snap +++ b/packages/compiler-vapor/__tests__/transforms/__snapshots__/vText.spec.ts.snap @@ -6,7 +6,7 @@ const t0 = _template("
", true) export function render(_ctx, $props, $emit, $attrs, $slots) { const n0 = t0() - const x0 = _child(n0) + const x0 = _child(n0, -1) _renderEffect(() => _setText(x0, _toDisplayString(_ctx.str))) return n0 }" @@ -18,7 +18,7 @@ const t0 = _template("
", true) export function render(_ctx) { const n0 = t0() - const x0 = _child(n0) + const x0 = _child(n0, -1) _renderEffect(() => _setText(x0, _toDisplayString(_ctx.test))) return n0 }" -- 2.47.3