MCPcopy
hub / github.com/axios/axios / stopServer

Function stopServer

tests/smoke/esm/tests/auth.smoke.test.js:16–30  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

14};
15
16const stopServer = (server) => {
17 if (!server || !server.listening) {
18 return Promise.resolve();
19 }
20
21 return new Promise((resolve, reject) => {
22 server.close((error) => {
23 if (error) {
24 reject(error);
25 return;
26 }
27 resolve();
28 });
29 });
30};
31
32describe('auth compat (dist export only)', () => {
33 let server;

Callers 1

auth.smoke.test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected