wip(ssr): v-bind basic usage
This commit is contained in:
13
packages/compiler-ssr/__tests__/ssrVBind.spec.ts
Normal file
13
packages/compiler-ssr/__tests__/ssrVBind.spec.ts
Normal 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>\`)
|
||||
}"
|
||||
`)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user