MCPcopy
hub / github.com/vuejs/core / renderOnce

Function renderOnce

packages/server-renderer/__tests__/ssrWatch.spec.ts:331–342  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329 })
330
331 async function renderOnce() {
332 const app = createSSRApp({
333 render: () => h('div', [h(ComponentA), h(ComponentB)]),
334 })
335 // @ts-expect-error ES2021 API
336 weakRefs.push(new WeakRef(app))
337
338 const html = await renderToString(app)
339
340 expect(html).toContain('Component A false')
341 expect(html).toContain('Component B false')
342 }
343
344 for (let i = 0; i < 10; i++) {
345 await renderOnce()

Callers 1

ssrWatch.spec.tsFile · 0.85

Calls 3

renderToStringFunction · 0.90
hFunction · 0.85
pushMethod · 0.65

Tested by

no test coverage detected