(workos: EmulatorClient, input: FaultArmInput)
| 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. */ |
| 190 | const 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: |
no test coverage detected