MCPcopy
hub / github.com/vercel/next.js / render$

Method render$

test/lib/next-modes/base.ts:885–896  ·  view source on GitHub ↗

* Fetch the HTML for the provided page. This is a shortcut for `renderViaHTTP().then(html => cheerio.load(html))`.

(
    ...args: Parameters<OmitFirstArgument<typeof renderViaHTTP>>
  )

Source from the content-addressed store, hash-verified

883 * Fetch the HTML for the provided page. This is a shortcut for `renderViaHTTP().then(html => cheerio.load(html))`.
884 */
885 public async render$(
886 ...args: Parameters<OmitFirstArgument<typeof renderViaHTTP>>
887 ): Promise<ReturnType<typeof cheerio.load>> {
888 try {
889 this.throwIfUnavailable()
890 } catch (error) {
891 Error.captureStackTrace(error, this.render$)
892 throw error
893 }
894 const html = await renderViaHTTP(this.url, ...args)
895 return cheerio.load(html)
896 }
897
898 /**
899 * Fetch the HTML for the provided page. This is a shortcut for `fetchViaHTTP().then(res => res.text())`.

Calls 3

throwIfUnavailableMethod · 0.95
renderViaHTTPFunction · 0.90
loadMethod · 0.65

Tested by 6

runTestsFunction · 0.64
runTestsFunction · 0.64
runTestsFunction · 0.64
getPageFunction · 0.64
getTimestampPageDataFunction · 0.64
runTestsFunction · 0.64