fix(sfc): inherit parent scopeId on child rooot (#756)

This commit is contained in:
hareku
2020-02-21 22:44:13 +09:00
committed by GitHub
parent 1b9b235663
commit 9547c2b93d
5 changed files with 41 additions and 3 deletions

View File

@@ -562,7 +562,7 @@ describe('ssr: renderToString', () => {
}
expect(await renderToString(h(Parent))).toBe(
`<div data-v-child><span data-v-test data-v-child-s>slot</span></div>`
`<div data-v-test data-v-child><span data-v-test data-v-child-s>slot</span></div>`
)
})
})

View File

@@ -26,6 +26,14 @@ describe('ssr: renderAttrs', () => {
).toBe(` id="foo" title="bar"`)
})
test('empty value attrs', () => {
expect(
ssrRenderAttrs({
'data-v-abc': ''
})
).toBe(` data-v-abc`)
})
test('escape attrs', () => {
expect(
ssrRenderAttrs({