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

Function armFault

e2e/cloud/credential-write-durability.test.ts:190–194  ·  view source on GitHub ↗
(workos: EmulatorClient, input: FaultArmInput)

Source from the content-addressed store, hash-verified

188/** Arm a fault on the shared emulator and take it back down with the scope, by
189 * id — a blanket `faults.clear()` would also disarm a neighbouring scenario's. */
190const armFault = (workos: EmulatorClient, input: FaultArmInput) =>
191 Effect.acquireRelease(
192 Effect.promise(() => workos.faults.arm(input)),
193 (armed) => Effect.promise(() => workos.faults.clear(armed.id)).pipe(Effect.ignore),
194 );
195
196/** How many responses this armed fault actually injected, read back from the
197 * emulator's ledger. This is the proof that the failure under test HAPPENED:

Callers 2

holdWritesInConflictFunction · 0.70

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected