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

Function nextBuild

test/lib/next-test-utils.ts:533–545  ·  view source on GitHub ↗
(
  dir: string,
  args: string[] = [],
  opts: NextOptions = {}
)

Source from the content-addressed store, hash-verified

531}
532
533export function nextBuild(
534 dir: string,
535 args: string[] = [],
536 opts: NextOptions = {}
537) {
538 if (!opts.disableAutoSkewProtection && shouldUseTurbopack() && !opts.env) {
539 opts.env ??= {}
540 opts.env.NEXT_DEPLOYMENT_ID = 'test-dpl-id-1234'
541 opts.env.__NEXT_IMMUTABLE_ASSET_TOKEN = 'test-immutable-tkn-7890'
542 }
543
544 return runNextCommand(['build', dir, ...args], opts)
545}
546
547export function nextTest(
548 dir: string,

Callers 15

index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90
gsp-gssp.test.tsFile · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90

Calls 2

shouldUseTurbopackFunction · 0.90
runNextCommandFunction · 0.85

Tested by 12

runTestsFunction · 0.72
getDataFunction · 0.72
devStartAndExportFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
collectStdoutFromBuildFunction · 0.72
runTestsFunction · 0.72
getStderrFunction · 0.72
buildAndStartFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72