MCPcopy
hub / github.com/vercel/next.js / getProps

Function getProps

test/integration/root-optional-revalidate/test/index.test.ts:18–22  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

16let appPort: number | undefined
17
18const getProps = async (path) => {
19 const html = await renderViaHTTP(appPort, path)
20 const $ = cheerio.load(html)
21 return JSON.parse($('#props').text())
22}
23
24const runTests = () => {
25 it('should render / correctly', async () => {

Callers 1

runTestsFunction · 0.85

Calls 5

renderViaHTTPFunction · 0.90
loadMethod · 0.65
textMethod · 0.65
$Function · 0.50
parseMethod · 0.45

Tested by

no test coverage detected