The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { it } from "@effect/vitest"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import { expect } from "vite-plus/test"; |
| 4 | |
| 5 | import { awaitDetachedSpawn } from "./windowsVerbatimSpawn.ts"; |
| 6 | |
| 7 | it.effect("reports a synchronous spawn exception as a failure", () => |
| 8 | Effect.gen(function* () { |
| 9 | const error = new Error("invalid spawn options"); |
| 10 | const result = yield* awaitDetachedSpawn(() => { |
| 11 | throw error; |
| 12 | }).pipe(Effect.result); |
| 13 | expect(result).toMatchObject({ _tag: "Failure", failure: error }); |
| 14 | }), |
| 15 | ); |