MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / stopServer

Function stopServer

Example/e2etest/e2e/globalTeardown.ts:34–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32const pidFile = path.join(projectRoot, '.e2e-artifacts/.server.pid');
33
34function stopServer() {
35 if (!fs.existsSync(pidFile)) {
36 return;
37 }
38
39 try {
40 const pid = Number(fs.readFileSync(pidFile, 'utf8').trim());
41 if (pid > 0) {
42 process.kill(pid, 'SIGTERM');
43 }
44 } catch {
45 // ignore stale pid
46 }
47
48 fs.rmSync(pidFile, { force: true });
49}
50
51async function globalTeardown() {
52 try {

Callers 1

globalTeardownFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected