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

Function checkAsPath

test/integration/revalidate-as-path/test/index.test.ts:22–28  ·  view source on GitHub ↗
(urlPath, expectedAsPath)

Source from the content-addressed store, hash-verified

20let stdout = ''
21
22const checkAsPath = async (urlPath, expectedAsPath) => {
23 const html = await renderViaHTTP(appPort, urlPath)
24 const $ = cheerio.load(html)
25 const asPath = $('#as-path').text()
26
27 expect(asPath).toBe(expectedAsPath)
28}
29
30const runTests = () => {
31 it('should render with correct asPath with /_next/data /index requested', async () => {

Callers 1

runTestsFunction · 0.85

Calls 5

renderViaHTTPFunction · 0.90
loadMethod · 0.65
textMethod · 0.65
$Function · 0.50
expectFunction · 0.50

Tested by

no test coverage detected