@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 19 lines 762 Bytes
Raw
1 import * as NodeServices from "@effect/platform-node/NodeServices";
2 import { assert, it } from "@effect/vitest";
3 import * as Effect from "effect/Effect";
4 import * as FileSystem from "effect/FileSystem";
5
6 import { makeReplayServerConfig } from "./ProviderReplayHarness.ts";
7
8 it.effect("deletes its temp state directory when the scenario scope closes", () =>
9 Effect.gen(function* () {
10 const fs = yield* FileSystem.FileSystem;
11 const baseDir = yield* Effect.gen(function* () {
12 const config = yield* makeReplayServerConfig("temp-cleanup");
13 assert.isTrue(yield* fs.exists(config.stateDir));
14 return config.baseDir;
15 }).pipe(Effect.scoped);
16
17 assert.isFalse(yield* fs.exists(baseDir));
18 }).pipe(Effect.provide(NodeServices.layer)),
19 );