vue3-core/packages/compiler-ssr/__tests__/ssrVBind.spec.ts

14 lines
354 B
TypeScript
Raw Normal View History

2020-02-05 01:20:51 +08:00
import { compile } from '../src'
describe('ssr: v-bind', () => {
test('basic', () => {
expect(compile(`<div :id="id"/>`).code).toMatchInlineSnapshot(`
"const { _renderAttr } = require(\\"vue\\")
return function ssrRender(_ctx, _push, _parent) {
_push(\`<div\${_renderAttr(\\"id\\", _ctx.id)}></div>\`)
}"
`)
})
})