wip(ssr): v-bind basic usage

This commit is contained in:
Evan You
2020-02-04 12:20:51 -05:00
parent 7f38c1e0ff
commit 6a5ed49ea9
25 changed files with 173 additions and 75 deletions

View File

@@ -0,0 +1,13 @@
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>\`)
}"
`)
})
})