|
| 1 | +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
| 2 | + |
| 3 | +exports[`compiler: v-skip > transform > basic 1`] = ` |
| 4 | +"const _Vue = Vue |
| 5 | +
|
| 6 | +return function render(_ctx, _cache) { |
| 7 | + with (_ctx) { |
| 8 | + const { createCommentVNode: _createCommentVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue |
| 9 | +
|
| 10 | + return (_ctx.ok) |
| 11 | + ? _createCommentVNode("v-skip", true) |
| 12 | + : (_openBlock(), _createElementBlock("div", { key: 1 })) |
| 13 | + } |
| 14 | +}" |
| 15 | +`; |
| 16 | + |
| 17 | +exports[`compiler: v-skip > transform > nested v-skip 1`] = ` |
| 18 | +"const _Vue = Vue |
| 19 | +
|
| 20 | +return function render(_ctx, _cache) { |
| 21 | + with (_ctx) { |
| 22 | + const { createCommentVNode: _createCommentVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, createElementVNode: _createElementVNode, Fragment: _Fragment } = _Vue |
| 23 | +
|
| 24 | + return (_ctx.ok) |
| 25 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ |
| 26 | + (_ctx.nested) |
| 27 | + ? _createCommentVNode("v-skip", true) |
| 28 | + : (_openBlock(), _createElementBlock("span", { key: 1 })) |
| 29 | + ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 30 | + : (_openBlock(), _createElementBlock("div", { key: 1 }, [ |
| 31 | + (_ctx.nested) |
| 32 | + ? _createCommentVNode("v-skip", true) |
| 33 | + : (_openBlock(), _createElementBlock("span", { key: 1 })) |
| 34 | + ])) |
| 35 | + } |
| 36 | +}" |
| 37 | +`; |
| 38 | + |
| 39 | +exports[`compiler: v-skip > transform > on component 1`] = ` |
| 40 | +"const _Vue = Vue |
| 41 | +
|
| 42 | +return function render(_ctx, _cache) { |
| 43 | + with (_ctx) { |
| 44 | + const { withCtx: _withCtx, createCommentVNode: _createCommentVNode, resolveComponent: _resolveComponent, openBlock: _openBlock, createBlock: _createBlock } = _Vue |
| 45 | +
|
| 46 | + const _component_Comp = _resolveComponent("Comp") |
| 47 | +
|
| 48 | + return (_ctx.ok) |
| 49 | + ? _createCommentVNode("v-skip", true) |
| 50 | + : (_openBlock(), _createBlock(_component_Comp, { key: 1 })) |
| 51 | + } |
| 52 | +}" |
| 53 | +`; |
| 54 | + |
| 55 | +exports[`compiler: v-skip > transform > on component with default slot 1`] = ` |
| 56 | +"const _Vue = Vue |
| 57 | +
|
| 58 | +return function render(_ctx, _cache) { |
| 59 | + with (_ctx) { |
| 60 | + const { withCtx: _withCtx, resolveComponent: _resolveComponent, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createBlock: _createBlock } = _Vue |
| 61 | +
|
| 62 | + const _component_Comp = _resolveComponent("Comp") |
| 63 | +
|
| 64 | + return (_ctx.ok) |
| 65 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, ["foo"], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 66 | + : (_openBlock(), _createBlock(_component_Comp, { key: 1 }, { |
| 67 | + default: _withCtx(() => ["foo"]), |
| 68 | + _: 1 /* STABLE */ |
| 69 | + })) |
| 70 | + } |
| 71 | +}" |
| 72 | +`; |
| 73 | + |
| 74 | +exports[`compiler: v-skip > transform > on component with multiple implicit slot 1`] = ` |
| 75 | +"const _Vue = Vue |
| 76 | +
|
| 77 | +return function render(_ctx, _cache) { |
| 78 | + with (_ctx) { |
| 79 | + const { withCtx: _withCtx, createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createBlock: _createBlock } = _Vue |
| 80 | +
|
| 81 | + const _component_Comp = _resolveComponent("Comp") |
| 82 | +
|
| 83 | + return (_ctx.ok) |
| 84 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ |
| 85 | + _createElementVNode("span"), |
| 86 | + _createElementVNode("div") |
| 87 | + ], 64 /* STABLE_FRAGMENT */)) |
| 88 | + : (_openBlock(), _createBlock(_component_Comp, { key: 1 }, { |
| 89 | + foo: _withCtx(() => ["foo"]), |
| 90 | + default: _withCtx(() => [ |
| 91 | + _createElementVNode("span"), |
| 92 | + _createElementVNode("div") |
| 93 | + ]), |
| 94 | + _: 1 /* STABLE */ |
| 95 | + })) |
| 96 | + } |
| 97 | +}" |
| 98 | +`; |
| 99 | + |
| 100 | +exports[`compiler: v-skip > transform > on component with multiple named slot 1`] = ` |
| 101 | +"const _Vue = Vue |
| 102 | +
|
| 103 | +return function render(_ctx, _cache) { |
| 104 | + with (_ctx) { |
| 105 | + const { withCtx: _withCtx, resolveComponent: _resolveComponent, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createBlock: _createBlock } = _Vue |
| 106 | +
|
| 107 | + const _component_Comp = _resolveComponent("Comp") |
| 108 | +
|
| 109 | + return (_ctx.ok) |
| 110 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, ["default"], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 111 | + : (_openBlock(), _createBlock(_component_Comp, { key: 1 }, { |
| 112 | + default: _withCtx(() => ["default"]), |
| 113 | + foo: _withCtx(() => ["foo"]), |
| 114 | + _: 1 /* STABLE */ |
| 115 | + })) |
| 116 | + } |
| 117 | +}" |
| 118 | +`; |
| 119 | + |
| 120 | +exports[`compiler: v-skip > transform > on dynamic component 1`] = ` |
| 121 | +"const _Vue = Vue |
| 122 | +
|
| 123 | +return function render(_ctx, _cache) { |
| 124 | + with (_ctx) { |
| 125 | + const { withCtx: _withCtx, renderSlot: _renderSlot, resolveDynamicComponent: _resolveDynamicComponent, openBlock: _openBlock, createBlock: _createBlock } = _Vue |
| 126 | +
|
| 127 | + return (_ctx.ok) |
| 128 | + ? _renderSlot(_ctx.$slots, "default", { key: 0 }) |
| 129 | + : (_openBlock(), _createBlock(_resolveDynamicComponent(_ctx.Comp), { key: 1 }, { |
| 130 | + default: _withCtx(() => [ |
| 131 | + _renderSlot(_ctx.$slots, "default", { key: 0 }) |
| 132 | + ]), |
| 133 | + _: 3 /* FORWARDED */ |
| 134 | + })) |
| 135 | + } |
| 136 | +}" |
| 137 | +`; |
| 138 | + |
| 139 | +exports[`compiler: v-skip > transform > v-else + v-skip 1`] = ` |
| 140 | +"const _Vue = Vue |
| 141 | +
|
| 142 | +return function render(_ctx, _cache) { |
| 143 | + with (_ctx) { |
| 144 | + const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment } = _Vue |
| 145 | +
|
| 146 | + return (_ctx.ok) |
| 147 | + ? (_openBlock(), _createElementBlock("div", { key: 0 })) |
| 148 | + : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ |
| 149 | + (_ctx.nested) |
| 150 | + ? _createCommentVNode("v-skip", true) |
| 151 | + : (_openBlock(), _createElementBlock("div", { key: 1 })) |
| 152 | + ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 153 | + } |
| 154 | +}" |
| 155 | +`; |
| 156 | + |
| 157 | +exports[`compiler: v-skip > transform > v-else-if + v-skip 1`] = ` |
| 158 | +"const _Vue = Vue |
| 159 | +
|
| 160 | +return function render(_ctx, _cache) { |
| 161 | + with (_ctx) { |
| 162 | + const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode, Fragment: _Fragment } = _Vue |
| 163 | +
|
| 164 | + return (_ctx.ok) |
| 165 | + ? (_openBlock(), _createElementBlock("div", { key: 0 })) |
| 166 | + : (_ctx.yes) |
| 167 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [ |
| 168 | + (_ctx.nested) |
| 169 | + ? _createCommentVNode("v-skip", true) |
| 170 | + : (_openBlock(), _createElementBlock("div", { key: 1 })) |
| 171 | + ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 172 | + : _createCommentVNode("v-if", true) |
| 173 | + } |
| 174 | +}" |
| 175 | +`; |
| 176 | + |
| 177 | +exports[`compiler: v-skip > transform > v-if + v-skip 1`] = ` |
| 178 | +"const _Vue = Vue |
| 179 | +
|
| 180 | +return function render(_ctx, _cache) { |
| 181 | + with (_ctx) { |
| 182 | + const { createCommentVNode: _createCommentVNode, openBlock: _openBlock, createElementBlock: _createElementBlock, Fragment: _Fragment } = _Vue |
| 183 | +
|
| 184 | + return (_ctx.ok) |
| 185 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ |
| 186 | + (_ctx.nested) |
| 187 | + ? _createCommentVNode("v-skip", true) |
| 188 | + : (_openBlock(), _createElementBlock("div", { key: 1 })) |
| 189 | + ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 190 | + : _createCommentVNode("v-if", true) |
| 191 | + } |
| 192 | +}" |
| 193 | +`; |
| 194 | + |
| 195 | +exports[`compiler: v-skip > transform > with component children 1`] = ` |
| 196 | +"const _Vue = Vue |
| 197 | +
|
| 198 | +return function render(_ctx, _cache) { |
| 199 | + with (_ctx) { |
| 200 | + const { resolveComponent: _resolveComponent, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createElementBlock: _createElementBlock } = _Vue |
| 201 | +
|
| 202 | + const _component_Comp = _resolveComponent("Comp") |
| 203 | +
|
| 204 | + return (_ctx.ok) |
| 205 | + ? (_openBlock(), _createBlock(_component_Comp, { key: 0 })) |
| 206 | + : (_openBlock(), _createElementBlock("div", { key: 1 }, [ |
| 207 | + (_openBlock(), _createBlock(_component_Comp, { key: 0 })) |
| 208 | + ])) |
| 209 | + } |
| 210 | +}" |
| 211 | +`; |
| 212 | + |
| 213 | +exports[`compiler: v-skip > transform > with element children 1`] = ` |
| 214 | +"const _Vue = Vue |
| 215 | +
|
| 216 | +return function render(_ctx, _cache) { |
| 217 | + with (_ctx) { |
| 218 | + const { createElementVNode: _createElementVNode, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue |
| 219 | +
|
| 220 | + return (_ctx.ok) |
| 221 | + ? (_openBlock(), _createElementBlock("span", { key: 0 })) |
| 222 | + : (_openBlock(), _createElementBlock("div", { key: 1 }, [ |
| 223 | + (_openBlock(), _createElementBlock("span", { key: 0 })) |
| 224 | + ])) |
| 225 | + } |
| 226 | +}" |
| 227 | +`; |
| 228 | + |
| 229 | +exports[`compiler: v-skip > transform > with multiple children 1`] = ` |
| 230 | +"const _Vue = Vue |
| 231 | +
|
| 232 | +return function render(_ctx, _cache) { |
| 233 | + with (_ctx) { |
| 234 | + const { createElementVNode: _createElementVNode, resolveComponent: _resolveComponent, createVNode: _createVNode, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue |
| 235 | +
|
| 236 | + const _component_Comp = _resolveComponent("Comp") |
| 237 | +
|
| 238 | + return (_ctx.ok) |
| 239 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [ |
| 240 | + _createElementVNode("span"), |
| 241 | + _createVNode(_component_Comp) |
| 242 | + ], 64 /* STABLE_FRAGMENT */)) |
| 243 | + : (_openBlock(), _createElementBlock("div", { key: 1 }, [ |
| 244 | + _createElementVNode("span"), |
| 245 | + _createVNode(_component_Comp) |
| 246 | + ])) |
| 247 | + } |
| 248 | +}" |
| 249 | +`; |
| 250 | + |
| 251 | +exports[`compiler: v-skip > transform > with text children 1`] = ` |
| 252 | +"const _Vue = Vue |
| 253 | +
|
| 254 | +return function render(_ctx, _cache) { |
| 255 | + with (_ctx) { |
| 256 | + const { Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock } = _Vue |
| 257 | +
|
| 258 | + return (_ctx.ok) |
| 259 | + ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, ["foo"], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)) |
| 260 | + : (_openBlock(), _createElementBlock("div", { key: 1 }, "foo")) |
| 261 | + } |
| 262 | +}" |
| 263 | +`; |
0 commit comments