MCPcopy Create free account
hub / github.com/vercel/vercel / testForkDevServer

Function testForkDevServer

packages/node/test/unit/dev.test.ts:12–31  ·  view source on GitHub ↗
(entrypoint: string, runtime?: 'node' | 'bun')

Source from the content-addressed store, hash-verified

10vi.setConfig({ testTimeout: 20 * 1000 });
11
12function testForkDevServer(entrypoint: string, runtime?: 'node' | 'bun') {
13 const ext = extname(entrypoint);
14 const isTypeScript = ext === '.ts';
15 const isEsm = ext === '.mjs';
16 return forkDevServer({
17 maybeTranspile: true,
18 config: {
19 debug: true,
20 },
21 isEsm,
22 isTypeScript,
23 meta: {},
24 require_: require,
25 tsConfig: undefined,
26 workPath: resolve(__dirname, '../dev-fixtures'),
27 entrypoint,
28 devServerPath: resolve(__dirname, '../../dist/dev-server.mjs'),
29 runtime,
30 });
31}
32
33const teardown: any = [];
34afterAll(() => Promise.all(teardown.map((fn: any) => fn())));

Callers 2

withDevServerFunction · 0.85
dev.test.tsFile · 0.85

Calls 2

forkDevServerFunction · 0.90
resolveFunction · 0.50

Tested by

no test coverage detected