MCPcopy
hub / github.com/coder/mux / getCurlMaxTime

Function getCurlMaxTime

src/node/services/tools/web_fetch.test.ts:48–55  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

46}
47
48function getCurlMaxTime(command: string): number {
49 const match = /--max-time\s+([0-9.]+)/.exec(command);
50 if (!match) {
51 throw new Error(`Missing --max-time in curl command: ${command}`);
52 }
53
54 return Number.parseFloat(match[1]);
55}
56
57afterEach(() => {
58 // Restore all spies (including the Date.now spy in the shared-timeout-budget

Callers 1

web_fetch.test.tsFile · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected