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

Function killApp

test/lib/next-test-utils.ts:640–656  ·  view source on GitHub ↗
(
  instance?: ChildProcess,
  signal: NodeJS.Signals | number = 'SIGKILL'
)

Source from the content-addressed store, hash-verified

638
639// Kill a launched app
640export async function killApp(
641 instance?: ChildProcess,
642 signal: NodeJS.Signals | number = 'SIGKILL'
643) {
644 if (!instance) {
645 return
646 }
647 if (
648 instance?.pid &&
649 instance.exitCode === null &&
650 instance.signalCode === null
651 ) {
652 const exitPromise = once(instance, 'exit')
653 await killProcess(instance.pid, signal)
654 await exitPromise
655 }
656}
657
658async function startListen(server: http.Server, port?: number) {
659 const listenerPromise = new Promise((resolve) => {

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
gsp-gssp.test.tsFile · 0.90
index.test.tsFile · 0.90
runTestsFunction · 0.90
index.test.tsFile · 0.90
index.test.tsFile · 0.90

Calls 2

onceFunction · 0.90
killProcessFunction · 0.85

Tested by 11

runTestsFunction · 0.72
getDataFunction · 0.72
devStartAndExportFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
checkMissingFunction · 0.72
runTestsFunction · 0.72
runTestsFunction · 0.72
getStderrFunction · 0.72
runSoloTestsFunction · 0.72
runTestsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…