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

Function extract

src/node/runtime/SSHRuntime.fork.test.ts:455–461  ·  view source on GitHub ↗
(cmds: string[])

Source from the content-addressed store, hash-verified

453 await runtime2.forkWorkspace(buildForkParams());
454
455 const extract = (cmds: string[]): string => {
456 const match = cmds
457 .map((c) => /\.mux-fork-staging-([0-9a-f]{12})/.exec(c)?.[1])
458 .find((m): m is string => Boolean(m));
459 if (!match) throw new Error("no staging id observed");
460 return match;
461 };
462
463 expect(extract(runtime1.commands)).not.toBe(extract(runtime2.commands));
464 });

Callers 1

Calls 1

execMethod · 0.65

Tested by

no test coverage detected