The best way to control Claude Code, Codex and more from any computer or phone

main
ts 15 lines 517 Bytes
Raw
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 );