MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / startTestServer

Function startTestServer

apps/local/src/serve.test.ts:28–39  ·  view source on GitHub ↗
(
  opts: { authToken?: string; hostname?: string } = {},
)

Source from the content-addressed store, hash-verified

26});
27
28const startTestServer = async (
29 opts: { authToken?: string; hostname?: string } = {},
30): Promise<string> => {
31 server = await startServer({
32 port: 0,
33 hostname: opts.hostname ?? "127.0.0.1",
34 clientDir,
35 authToken: opts.authToken ?? TOKEN,
36 handlers: testHandlers(),
37 });
38 return `http://127.0.0.1:${server.port}`;
39};
40
41beforeEach(() => {
42 clientDir = mkdtempSync(join(tmpdir(), "exec-local-serve-"));

Callers 1

serve.test.tsFile · 0.85

Calls 2

startServerFunction · 0.90
testHandlersFunction · 0.85

Tested by

no test coverage detected