|
| 1 | +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
| 2 | + |
| 3 | +exports[`scopeId compiler support > should wrap default slot 1`] = ` |
| 4 | +"import { resolveComponent as _resolveComponent, withVaporCtx as _withVaporCtx, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue'; |
| 5 | +const t0 = _template("<div></div>") |
| 6 | +
|
| 7 | +export function render(_ctx) { |
| 8 | + const _component_Child = _resolveComponent("Child") |
| 9 | + const n1 = _createComponentWithFallback(_component_Child, null, { |
| 10 | + "default": _withVaporCtx(() => { |
| 11 | + const n0 = t0() |
| 12 | + return n0 |
| 13 | + }) |
| 14 | + }, true) |
| 15 | + return n1 |
| 16 | +}" |
| 17 | +`; |
| 18 | + |
| 19 | +exports[`scopeId compiler support > should wrap dynamic slots 1`] = ` |
| 20 | +"import { resolveComponent as _resolveComponent, withVaporCtx as _withVaporCtx, createForSlots as _createForSlots, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue'; |
| 21 | +const t0 = _template("<div test></div>") |
| 22 | +
|
| 23 | +export function render(_ctx) { |
| 24 | + const _component_Child = _resolveComponent("Child") |
| 25 | + const n4 = _createComponentWithFallback(_component_Child, null, { |
| 26 | + $: [ |
| 27 | + () => (_ctx.ok |
| 28 | + ? { |
| 29 | + name: "foo", |
| 30 | + fn: _withVaporCtx(() => { |
| 31 | + const n0 = t0() |
| 32 | + return n0 |
| 33 | + }) |
| 34 | + } |
| 35 | + : void 0), |
| 36 | + () => (_createForSlots(_ctx.list, (i) => ({ |
| 37 | + name: i, |
| 38 | + fn: _withVaporCtx(() => { |
| 39 | + const n2 = t0() |
| 40 | + return n2 |
| 41 | + }) |
| 42 | + }))) |
| 43 | + ] |
| 44 | + }, true) |
| 45 | + return n4 |
| 46 | +}" |
| 47 | +`; |
| 48 | + |
| 49 | +exports[`scopeId compiler support > should wrap named slots 1`] = ` |
| 50 | +"import { resolveComponent as _resolveComponent, toDisplayString as _toDisplayString, setText as _setText, renderEffect as _renderEffect, withVaporCtx as _withVaporCtx, createComponentWithFallback as _createComponentWithFallback, template as _template } from 'vue'; |
| 51 | +const t0 = _template(" ") |
| 52 | +const t1 = _template("<div test></div>") |
| 53 | +
|
| 54 | +export function render(_ctx) { |
| 55 | + const _component_Child = _resolveComponent("Child") |
| 56 | + const n4 = _createComponentWithFallback(_component_Child, null, { |
| 57 | + "foo": _withVaporCtx((_slotProps0) => { |
| 58 | + const n0 = t0() |
| 59 | + _renderEffect(() => _setText(n0, _toDisplayString(_slotProps0["msg"]))) |
| 60 | + return n0 |
| 61 | + }), |
| 62 | + "bar": _withVaporCtx(() => { |
| 63 | + const n2 = t1() |
| 64 | + return n2 |
| 65 | + }) |
| 66 | + }, true) |
| 67 | + return n4 |
| 68 | +}" |
| 69 | +`; |
0 commit comments