Skip to content

Commit

Permalink
chore: updaed unit test snap
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c committed Jan 3, 2024
1 parent 27dc34c commit 5ca1018
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compiler: v-if > codegen > basic v-if 1`] = `
"const _Vue = Vue
return function render(_ctx, _cache) {
with (_ctx) {
const { openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode } = _Vue
return ok
? (_openBlock(), _createElementBlock("div", { key: 0 }))
: _createCommentVNode("v-if", true)
}
}"
`;

exports[`compiler: v-if > codegen > increasing key: v-if + v-else-if + v-else 1`] = `
"const _Vue = Vue
Expand Down Expand Up @@ -40,6 +54,38 @@ return function render(_ctx, _cache) {
}"
`;

exports[`compiler: v-if > codegen > template v-if 1`] = `
"const _Vue = Vue
return function render(_ctx, _cache) {
with (_ctx) {
const { createElementVNode: _createElementVNode, Fragment: _Fragment, openBlock: _openBlock, createElementBlock: _createElementBlock, createCommentVNode: _createCommentVNode } = _Vue
return ok
? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [
_createElementVNode("div"),
"hello",
_createElementVNode("p")
], 64 /* STABLE_FRAGMENT */))
: _createCommentVNode("v-if", true)
}
}"
`;

exports[`compiler: v-if > codegen > template v-if w/ single <slot/> child 1`] = `
"const _Vue = Vue
return function render(_ctx, _cache) {
with (_ctx) {
const { renderSlot: _renderSlot, createCommentVNode: _createCommentVNode } = _Vue
return ok
? _renderSlot($slots, "default", { key: 0 })
: _createCommentVNode("v-if", true)
}
}"
`;

exports[`compiler: v-if > codegen > template v-if w/ v-once 1`] = `
"const _Vue = Vue
Expand Down

0 comments on commit 5ca1018

Please sign in to comment.