Showing the changes to apps/server/src/sourceControl/BitbucketSourceControlProvider.test.ts (1 of 42 files). Show all
Unified · Split
| @@ -6,8 +6,8 @@ import * as Option from "effect/Option"; · 5 unmodified lines | |||
| 6 | import * as BitbucketApi from "./BitbucketApi.ts"; | 6 | import * as BitbucketApi from "./BitbucketApi.ts"; |
| 7 | import * as BitbucketSourceControlProvider from "./BitbucketSourceControlProvider.ts"; | 7 | import * as BitbucketSourceControlProvider from "./BitbucketSourceControlProvider.ts"; |
| 8 | 8 | ||
| 9 | function makeProvider(bitbucket: Partial<BitbucketApi.BitbucketApiShape>) { | 9 | function makeProvider(bitbucket: Partial<BitbucketApi.BitbucketApi["Service"]>) { |
| 10 | return BitbucketSourceControlProvider.make().pipe( | 10 | return BitbucketSourceControlProvider.make.pipe( |
| 11 | Effect.provide(Layer.mock(BitbucketApi.BitbucketApi)(bitbucket)), | 11 | Effect.provide(Layer.mock(BitbucketApi.BitbucketApi)(bitbucket)), |
| 12 | ); | 12 | ); |
| 13 | } | 13 | } |
| @@ -53,7 +53,8 @@ it.effect("maps Bitbucket PR summaries into provider-neutral change requests", ( · 39 unmodified lines | |||
| 53 | 53 | ||
| 54 | it.effect("lists Bitbucket PRs through provider-neutral input names", () => | 54 | it.effect("lists Bitbucket PRs through provider-neutral input names", () => |
| 55 | Effect.gen(function* () { | 55 | Effect.gen(function* () { |
| 56 | let listInput: Parameters<BitbucketApi.BitbucketApiShape["listPullRequests"]>[0] | null = null; | 56 | let listInput: Parameters<BitbucketApi.BitbucketApi["Service"]["listPullRequests"]>[0] | null = |
| 57 | null; | ||
| 57 | const provider = yield* makeProvider({ | 58 | const provider = yield* makeProvider({ |
| 58 | listPullRequests: (input) => { | 59 | listPullRequests: (input) => { |
| 59 | listInput = input; | 60 | listInput = input; |
| @@ -79,8 +80,9 @@ it.effect("lists Bitbucket PRs through provider-neutral input names", () => · 19 unmodified lines | |||
| 79 | 80 | ||
| 80 | it.effect("creates Bitbucket PRs through provider-neutral input names", () => | 81 | it.effect("creates Bitbucket PRs through provider-neutral input names", () => |
| 81 | Effect.gen(function* () { | 82 | Effect.gen(function* () { |
| 82 | let createInput: Parameters<BitbucketApi.BitbucketApiShape["createPullRequest"]>[0] | null = | 83 | let createInput: |
| 83 | null; | 84 | | Parameters<BitbucketApi.BitbucketApi["Service"]["createPullRequest"]>[0] |
| 85 | | null = null; | ||
| 84 | const provider = yield* makeProvider({ | 86 | const provider = yield* makeProvider({ |
| 85 | createPullRequest: (input) => { | 87 | createPullRequest: (input) => { |
| 86 | createInput = input; | 88 | createInput = input; |