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

Function emulator

e2e/selfhost/mcp-enterprise-managed-auth.test.ts:85–92  ·  view source on GitHub ↗
(service: "okta" | "mcp")

Source from the content-addressed store, hash-verified

83 * shipped in `@executor-js/emulate` 0.14.0, and the npm package is the version
84 * this checkout pins — a hosted instance is whatever was last deployed. */
85const emulator = (service: "okta" | "mcp") =>
86 Effect.acquireRelease(
87 Effect.gen(function* () {
88 const port = yield* availablePort;
89 return yield* Effect.promise(() => createEmulator({ service, port }));
90 }),
91 (instance: Emulator) => Effect.promise(() => instance.close()).pipe(Effect.ignore),
92 );
93
94const requireString = (value: string | undefined | null, what: string): string => {
95 if (!value) throw new Error(`emulator returned no ${what}`);

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected