mirror of
https://github.com/hanzoai/dev-desktop.git
synced 2026-11-20 01:07:23 +00:00
16 lines
517 B
TypeScript
16 lines
517 B
TypeScript
import { it } from "@effect/vitest";
|
|
import * as Effect from "effect/Effect";
|
|
import { expect } from "vite-plus/test";
|
|
|
|
import { awaitDetachedSpawn } from "./windowsVerbatimSpawn.ts";
|
|
|
|
it.effect("reports a synchronous spawn exception as a failure", () =>
|
|
Effect.gen(function* () {
|
|
const error = new Error("invalid spawn options");
|
|
const result = yield* awaitDetachedSpawn(() => {
|
|
throw error;
|
|
}).pipe(Effect.result);
|
|
expect(result).toMatchObject({ _tag: "Failure", failure: error });
|
|
}),
|
|
);
|