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

Function getPage

test/e2e/app-dir/app-rendering/rendering.test.ts:66–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 describe('ISR', () => {
65 it('should revalidate the page when revalidate is configured', async () => {
66 const getPage = async () => {
67 const res = await next.fetch('isr-multiple/nested')
68 const html = await res.text()
69
70 return {
71 $: cheerio.load(html),
72 cacheHeader: res.headers['x-nextjs-cache'],
73 }
74 }
75 const { $ } = await getPage()
76 expect($('#layout-message').text()).toBe('hello from layout')
77 expect($('#page-message').text()).toBe('hello from page')

Callers 1

rendering.test.tsFile · 0.85

Calls 4

render$Method · 0.80
textMethod · 0.65
loadMethod · 0.65
fetchMethod · 0.45

Tested by

no test coverage detected