test: update tests and snapshots for helper prefixing
This commit is contained in:
@@ -3,7 +3,7 @@ import { compile } from '../src'
|
||||
describe('ssr: <slot>', () => {
|
||||
test('basic', () => {
|
||||
expect(compile(`<slot/>`).code).toMatchInlineSnapshot(`
|
||||
"const { _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
"const { ssrRenderSlot: _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
_ssrRenderSlot(_ctx.$slots, \\"default\\", {}, null, _push, _parent)
|
||||
@@ -13,7 +13,7 @@ describe('ssr: <slot>', () => {
|
||||
|
||||
test('with name', () => {
|
||||
expect(compile(`<slot name="foo" />`).code).toMatchInlineSnapshot(`
|
||||
"const { _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
"const { ssrRenderSlot: _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
_ssrRenderSlot(_ctx.$slots, \\"foo\\", {}, null, _push, _parent)
|
||||
@@ -23,7 +23,7 @@ describe('ssr: <slot>', () => {
|
||||
|
||||
test('with dynamic name', () => {
|
||||
expect(compile(`<slot :name="bar.baz" />`).code).toMatchInlineSnapshot(`
|
||||
"const { _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
"const { ssrRenderSlot: _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
_ssrRenderSlot(_ctx.$slots, _ctx.bar.baz, {}, null, _push, _parent)
|
||||
@@ -34,7 +34,7 @@ describe('ssr: <slot>', () => {
|
||||
test('with props', () => {
|
||||
expect(compile(`<slot name="foo" :p="1" bar="2" />`).code)
|
||||
.toMatchInlineSnapshot(`
|
||||
"const { _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
"const { ssrRenderSlot: _ssrRenderSlot } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
_ssrRenderSlot(_ctx.$slots, \\"foo\\", {
|
||||
@@ -48,7 +48,7 @@ describe('ssr: <slot>', () => {
|
||||
test('with fallback', () => {
|
||||
expect(compile(`<slot>some {{ fallback }} content</slot>`).code)
|
||||
.toMatchInlineSnapshot(`
|
||||
"const { _ssrRenderSlot, _ssrInterpolate } = require(\\"@vue/server-renderer\\")
|
||||
"const { ssrRenderSlot: _ssrRenderSlot, ssrInterpolate: _ssrInterpolate } = require(\\"@vue/server-renderer\\")
|
||||
|
||||
return function ssrRender(_ctx, _push, _parent) {
|
||||
_ssrRenderSlot(_ctx.$slots, \\"default\\", {}, () => {
|
||||
|
||||
Reference in New Issue
Block a user