Skip to content

Commit

Permalink
chore: update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ygj6 committed Jan 15, 2024
1 parent 2749866 commit 0425692
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`compiler v-bind > .attr modifier 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, "^foo-bar", undefined, _ctx.id)
})
return n0
}"
`;

exports[`compiler v-bind > .attr modifier w/ no expression 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, "^foo-bar", undefined, _ctx.fooBar)
})
return n0
Expand Down Expand Up @@ -63,29 +63,29 @@ export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, "fooBar", undefined, _ctx.fooBar)
})
return n0
}"
`;

exports[`compiler v-bind > .prop modifier (shortband) w/ no expression 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, ".fooBar", undefined, _ctx.fooBar)
})
return n0
}"
`;

exports[`compiler v-bind > .prop modifier (shorthand) 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
Expand All @@ -99,41 +99,41 @@ export function render(_ctx) {
`;

exports[`compiler v-bind > .prop modifier 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, ".fooBar", undefined, _ctx.id)
})
return n0
}"
`;

exports[`compiler v-bind > .prop modifier w/ dynamic arg 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, \`.\${_ctx.fooBar}\`, undefined, _ctx.id)
})
return n0
}"
`;
exports[`compiler v-bind > .prop modifier w/ no expression 1`] = `
"import { template as _template, children as _children, watchEffect as _watchEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
"import { template as _template, children as _children, renderEffect as _renderEffect, setDynamicProp as _setDynamicProp } from 'vue/vapor';
export function render(_ctx) {
const t0 = _template("<div></div>")
const n0 = t0()
const { 0: [n1],} = _children(n0)
_watchEffect(() => {
_renderEffect(() => {
_setDynamicProp(n1, ".fooBar", undefined, _ctx.fooBar)
})
return n0
Expand Down
14 changes: 7 additions & 7 deletions packages/compiler-vapor/__tests__/transforms/vBind.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains('_setDynamicProp(n1, ".fooBar", undefined, _ctx.id)')
})

Expand All @@ -274,7 +274,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains(
'_setDynamicProp(n1, ".fooBar", undefined, _ctx.fooBar)',
)
Expand All @@ -295,7 +295,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains(
'_setDynamicProp(n1, `.${_ctx.fooBar}`, undefined, _ctx.id)',
)
Expand All @@ -318,7 +318,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains('_setDynamicProp(n1, ".fooBar", undefined, _ctx.id)')
})

Expand All @@ -337,7 +337,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains(
'_setDynamicProp(n1, ".fooBar", undefined, _ctx.fooBar)',
)
Expand All @@ -358,7 +358,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains('_setDynamicProp(n1, "^foo-bar", undefined, _ctx.id)')
})

Expand All @@ -377,7 +377,7 @@ describe('compiler v-bind', () => {
})

expect(code).matchSnapshot()
expect(code).contains('watchEffect')
expect(code).contains('renderEffect')
expect(code).contains(
'_setDynamicProp(n1, "^foo-bar", undefined, _ctx.fooBar)',
)
Expand Down

0 comments on commit 0425692

Please sign in to comment.