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

Function debugPrint

test/lib/next-test-utils.ts:48–60  ·  view source on GitHub ↗
(...args: unknown[])

Source from the content-addressed store, hash-verified

46
47// This goes straight to Node’s stdout, avoiding Jest's verbose output:
48export const debugPrint = (...args: unknown[]) => {
49 const prettyArgs = args
50 .map((arg) =>
51 typeof arg === 'string'
52 ? arg
53 : inspect(arg, { colors: process.stdout.isTTY })
54 )
55 .join(' ')
56
57 const timestamp = new Date().toISOString().split('T')[1]
58
59 return process.stdout.write(`[${timestamp}] ${prettyArgs}\n`)
60}
61
62export function initNextServerScript(
63 scriptPath: string,

Callers 5

launchStandaloneSessionFunction · 0.90
webdriverFunction · 0.90
loadPageMethod · 0.90
runNextCommandFunction · 0.85
retryFunction · 0.85

Calls 5

inspectFunction · 0.90
splitMethod · 0.80
joinMethod · 0.45
mapMethod · 0.45
writeMethod · 0.45

Tested by 1

launchStandaloneSessionFunction · 0.72