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

Function beforePageLoad

test/e2e/app-dir/navigation/navigation.test.ts:45–53  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

43
44 const browser = await next.browser('/search-params?name=名', {
45 beforePageLoad(page) {
46 page.on('response', async (res) => {
47 requests.push({
48 pathname: new URL(res.url()).pathname,
49 ok: res.ok(),
50 headers: res.headers(),
51 })
52 })
53 },
54 })
55
56 expect(await browser.elementById('name').text()).toBe('名')

Callers

nothing calls this directly

Calls 6

pushMethod · 0.65
urlMethod · 0.65
okMethod · 0.65
onMethod · 0.45
headersMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected