import { compile } from '../src' function getElementString(src: string): string { return compile(src).code.match(/_push\((.*)\)/)![1] } describe('ssr compile integration test', () => { test('basic elements', () => { expect(getElementString(`
`)).toMatchInlineSnapshot( `"\`
\`"` ) }) test('static attrs', () => { expect( getElementString(`
`) ).toMatchInlineSnapshot(`"\`
\`"`) }) test('nested elements', () => { expect( getElementString(`
`) ).toMatchInlineSnapshot(`"\`
\`"`) }) test('nested elements with static text', () => { expect( getElementString(`
hello>bye
`) ).toMatchInlineSnapshot( `"\`
hello>bye
\`"` ) }) })