@devries-cameron20 / t3code Mirror · read-only / commits / de21f4dcd7
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 25, 08:45 UTC

Use GitHubCliLive as default test layer

- Wire `it.layer` to `GitHubCliLive` in `GitHubCli.test.ts` - Remove redundant `Effect.provide(GitHubCliLive)` calls in individual tests

Julius Marminge committed Mar 9, 2026 at 16:56 UTC de21f4dcd74037dc48d255e06ec27fd58187367b
1 file changed +5 -5
apps/server/src/git/Layers/GitHubCli.test.ts
+5 -5
@@ -1,5 +1,5 @@
1 import { assert, it } from "@effect/vitest";
2 -import { Effect, Layer } from "effect";
2 +import { Effect } from "effect";
3 import { afterEach, expect, vi } from "vitest";
4
5 vi.mock("../../processRunner", () => ({
@@ -11,7 +11,7 @@ import { GitHubCli } from "../Services/GitHubCli.ts";
11 import { GitHubCliLive } from "./GitHubCli.ts";
12
13 const mockedRunProcess = vi.mocked(runProcess);
14 -const layer = it.layer(Layer.empty);
14 +const layer = it.layer(GitHubCliLive);
15
16 afterEach(() => {
17 mockedRunProcess.mockReset();
@@ -49,7 +49,7 @@ layer("GitHubCliLive", (it) => {
49 cwd: "/repo",
50 reference: "#42",
51 });
52 - }).pipe(Effect.provide(GitHubCliLive));
52 + });
53
54 assert.deepStrictEqual(result, {
55 number: 42,
@@ -96,7 +96,7 @@ layer("GitHubCliLive", (it) => {
96 cwd: "/repo",
97 repository: "octocat/codething-mvp",
98 });
99 - }).pipe(Effect.provide(GitHubCliLive));
99 + });
100
101 assert.deepStrictEqual(result, {
102 nameWithOwner: "octocat/codething-mvp",
@@ -120,7 +120,7 @@ layer("GitHubCliLive", (it) => {
120 cwd: "/repo",
121 reference: "4888",
122 });
123 - }).pipe(Effect.provide(GitHubCliLive), Effect.flip);
123 + }).pipe(Effect.flip);
124
125 assert.equal(error.message.includes("Pull request not found"), true);
126 }),