Showing the changes to apps/server/src/sourceControl/GitHubSourceControlProvider.test.ts (1 of 59 files). Show all
Unified · Split
| @@ -2,11 +2,11 @@ import { assert, it } from "@effect/vitest"; · 1 unmodified line | ||
| 2 | 2 | import { DateTime, Effect, Layer, Option } from "effect"; |
| 3 | 3 | import { ChildProcessSpawner } from "effect/unstable/process"; |
| 4 | 4 | |
| 5 | −import { GitHubCli, type GitHubCliShape } from "./GitHubCli.ts"; | |
| 6 | −import type { VcsProcessOutput } from "../vcs/VcsProcess.ts"; | |
| 5 | +import * as VcsProcess from "../vcs/VcsProcess.ts"; | |
| 6 | +import * as GitHubCli from "./GitHubCli.ts"; | |
| 7 | 7 | import * as GitHubSourceControlProvider from "./GitHubSourceControlProvider.ts"; |
| 8 | 8 | |
| 9 | −const processResult = (stdout: string): VcsProcessOutput => ({ | |
| 9 | +const processResult = (stdout: string): VcsProcess.VcsProcessOutput => ({ | |
| 10 | 10 | exitCode: ChildProcessSpawner.ExitCode(0), |
| 11 | 11 | stdout, |
| 12 | 12 | stderr: "", |
| @@ -14,8 +14,10 @@ const processResult = (stdout: string): VcsProcessOutput => ({ · 1 unmodified line | ||
| 14 | 14 | stderrTruncated: false, |
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | −function makeProvider(github: Partial<GitHubCliShape>) { | |
| 18 | − return GitHubSourceControlProvider.make().pipe(Effect.provide(Layer.mock(GitHubCli)(github))); | |
| 17 | +function makeProvider(github: Partial<GitHubCli.GitHubCliShape>) { | |
| 18 | + return GitHubSourceControlProvider.make().pipe( | |
| 19 | + Effect.provide(Layer.mock(GitHubCli.GitHubCli)(github)), | |
| 20 | + ); | |
| 19 | 21 | } |
| 20 | 22 | |
| 21 | 23 | it.effect("maps GitHub PR summaries into provider-neutral change requests", () => |
| @@ -127,7 +129,7 @@ it.effect("treats empty non-open change request listing output as no results", ( · 105 unmodified lines | ||
| 127 | 129 | |
| 128 | 130 | it.effect("creates GitHub PRs through provider-neutral input names", () => |
| 129 | 131 | Effect.gen(function* () { |
| 130 | − let createInput: Parameters<GitHubCliShape["createPullRequest"]>[0] | null = null; | |
| 132 | + let createInput: Parameters<GitHubCli.GitHubCliShape["createPullRequest"]>[0] | null = null; | |
| 131 | 133 | const provider = yield* makeProvider({ |
| 132 | 134 | createPullRequest: (input) => { |
| 133 | 135 | createInput = input; |