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

Function fetchForTest

test/e2e/testmode/testmode.test.ts:44–51  ·  view source on GitHub ↗
(url: string, testData?: string)

Source from the content-addressed store, hash-verified

42 })
43
44 const fetchForTest = async (url: string, testData?: string) => {
45 return next.fetch(url, {
46 headers: {
47 'Next-Test-Proxy-Port': String(proxyServer.port),
48 'Next-Test-Data': testData ?? 'test1',
49 },
50 })
51 }
52
53 describe('app router', () => {
54 it('should fetch real data when Next-Test-* headers are not present', async () => {

Callers 1

testmode.test.tsFile · 0.85

Calls 2

StringFunction · 0.50
fetchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…