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