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

Function probeReachable

packages/plugins/keychain/src/index.test.ts:22–30  ·  view source on GitHub ↗
(serviceName: string)

Source from the content-addressed store, hash-verified

20// Detect whether the real system keychain is reachable (writes a sentinel and
21// removes it). Mirrors the plugin's own registration probe.
22const probeReachable = (serviceName: string): Effect.Effect<boolean> =>
23 Effect.gen(function* () {
24 const account = `__executor_keychain_test_probe__:${process.pid}:${Date.now()}`;
25 return yield* setPassword(serviceName, account, "probe").pipe(
26 Effect.andThen(deletePassword(serviceName, account).pipe(Effect.catch(() => Effect.void))),
27 Effect.as(true),
28 Effect.catch(() => Effect.succeed(false)),
29 );
30 });
31
32describe("keychain plugin", () => {
33 it.effect("exposes keychain metadata and registers a provider when reachable", () =>

Callers 1

index.test.tsFile · 0.85

Calls 2

setPasswordFunction · 0.90
deletePasswordFunction · 0.90

Tested by

no test coverage detected