import { compile } from '../src' describe('ssr: v-if', () => { test('basic', () => { expect(compile(`
`).code).toMatchInlineSnapshot(` " return function ssrRender(_ctx, _push, _parent) { if (_ctx.foo) { _push(\`
\`) } else { _push(\`\`) } }" `) }) test('with nested content', () => { expect(compile(`
hellook
`).code) .toMatchInlineSnapshot(` " return function ssrRender(_ctx, _push, _parent) { if (_ctx.foo) { _push(\`
hellook
\`) } else { _push(\`\`) } }" `) }) test('v-if + v-else', () => { expect(compile(`
`).code) .toMatchInlineSnapshot(` " return function ssrRender(_ctx, _push, _parent) { if (_ctx.foo) { _push(\`
\`) } else { _push(\`\`) } }" `) }) test('v-if + v-else-if', () => { expect(compile(`
`).code) .toMatchInlineSnapshot(` " return function ssrRender(_ctx, _push, _parent) { if (_ctx.foo) { _push(\`
\`) } else if (_ctx.bar) { _push(\`\`) } else { _push(\`\`) } }" `) }) test('v-if + v-else-if + v-else', () => { expect(compile(`

`).code) .toMatchInlineSnapshot(` " return function ssrRender(_ctx, _push, _parent) { if (_ctx.foo) { _push(\`

\`) } else if (_ctx.bar) { _push(\`\`) } else { _push(\`

\`) } }" `) }) test('