|
@@ -5,16 +5,11 @@ import {
|
|
|
withScopeId,
|
|
withScopeId,
|
|
|
resolveComponent,
|
|
resolveComponent,
|
|
|
ComponentOptions,
|
|
ComponentOptions,
|
|
|
- Portal,
|
|
|
|
|
ref,
|
|
ref,
|
|
|
defineComponent
|
|
defineComponent
|
|
|
} from 'vue'
|
|
} from 'vue'
|
|
|
import { escapeHtml, mockWarn } from '@vue/shared'
|
|
import { escapeHtml, mockWarn } from '@vue/shared'
|
|
|
-import {
|
|
|
|
|
- renderToString,
|
|
|
|
|
- renderComponent,
|
|
|
|
|
- SSRContext
|
|
|
|
|
-} from '../src/renderToString'
|
|
|
|
|
|
|
+import { renderToString, renderComponent } from '../src/renderToString'
|
|
|
import { ssrRenderSlot } from '../src/helpers/ssrRenderSlot'
|
|
import { ssrRenderSlot } from '../src/helpers/ssrRenderSlot'
|
|
|
|
|
|
|
|
mockWarn()
|
|
mockWarn()
|
|
@@ -511,21 +506,6 @@ describe('ssr: renderToString', () => {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- test('portal', async () => {
|
|
|
|
|
- const ctx: SSRContext = {}
|
|
|
|
|
- await renderToString(
|
|
|
|
|
- h(
|
|
|
|
|
- Portal,
|
|
|
|
|
- {
|
|
|
|
|
- target: `#target`
|
|
|
|
|
- },
|
|
|
|
|
- h('span', 'hello')
|
|
|
|
|
- ),
|
|
|
|
|
- ctx
|
|
|
|
|
- )
|
|
|
|
|
- expect(ctx.portals!['#target']).toBe('<span>hello</span>')
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
describe('scopeId', () => {
|
|
describe('scopeId', () => {
|
|
|
// note: here we are only testing scopeId handling for vdom serialization.
|
|
// note: here we are only testing scopeId handling for vdom serialization.
|
|
|
// compiled srr render functions will include scopeId directly in strings.
|
|
// compiled srr render functions will include scopeId directly in strings.
|