import { compile } from '../src' function compileWithWrapper(src: string) { return compile(`
${src}
`) } describe('ssr: v-model', () => { test(' (text types)', () => { expect(compileWithWrapper(``).code) .toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRenderAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect(compileWithWrapper(``).code) .toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRenderAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) }) test('', () => { expect( compileWithWrapper(``).code ).toMatchInlineSnapshot(` "const { ssrLooseEqual: _ssrLooseEqual, ssrIncludeBooleanAttr: _ssrIncludeBooleanAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) }) test('', () => { expect(compileWithWrapper(``).code) .toMatchInlineSnapshot(` "const { ssrLooseContain: _ssrLooseContain, ssrIncludeBooleanAttr: _ssrIncludeBooleanAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect( compileWithWrapper(``) .code ).toMatchInlineSnapshot(` "const { ssrLooseContain: _ssrLooseContain, ssrIncludeBooleanAttr: _ssrIncludeBooleanAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect( compileWithWrapper( `` ).code ).toMatchInlineSnapshot(` "const { ssrLooseEqual: _ssrLooseEqual, ssrIncludeBooleanAttr: _ssrIncludeBooleanAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect( compileWithWrapper( `` ).code ).toMatchInlineSnapshot(` "const { ssrLooseEqual: _ssrLooseEqual, ssrIncludeBooleanAttr: _ssrIncludeBooleanAttr, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) }) test('`).code) .toMatchInlineSnapshot(` "const { ssrRenderAttrs: _ssrRenderAttrs, ssrInterpolate: _ssrInterpolate } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) }) test('', () => { expect(compileWithWrapper(``).code) .toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRenderAttr, ssrRenderDynamicModel: _ssrRenderDynamicModel, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect( compileWithWrapper(``).code ).toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRenderAttr, ssrRenderDynamicModel: _ssrRenderDynamicModel, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) expect( compileWithWrapper(``).code ).toMatchInlineSnapshot(` "const { ssrRenderAttr: _ssrRenderAttr, ssrRenderDynamicModel: _ssrRenderDynamicModel, ssrRenderAttrs: _ssrRenderAttrs } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { _push(\`\`) }" `) }) test('', () => { expect(compileWithWrapper(``).code) .toMatchInlineSnapshot(` "const { mergeProps: _mergeProps } = require(\\"vue\\") const { ssrRenderAttrs: _ssrRenderAttrs, ssrGetDynamicModelProps: _ssrGetDynamicModelProps } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { let _temp0 _push(\`\`) }" `) expect( compileWithWrapper(``) .code ).toMatchInlineSnapshot(` "const { mergeProps: _mergeProps } = require(\\"vue\\") const { ssrRenderAttrs: _ssrRenderAttrs, ssrGetDynamicModelProps: _ssrGetDynamicModelProps } = require(\\"@vue/server-renderer\\") return function ssrRender(_ctx, _push, _parent, _attrs) { let _temp0 _push(\`\`) }" `) }) })