Skip to content

Commit bafa558

Browse files
test(source-control): forge behaviour is tested in its own package
Server tests reached into forge internals to test forge behaviour: template detection, stack rebase, Bitbucket's API, auth-probe parsing, remote claims, Forgejo checkout, and provider halves of pull request service cases. Those now live in their forge packages, on a TestSourceControlHost that can run real git (layerWithRealGit). Forge-neutral server logic (GitManager, PullRequestService, discovery, the provider registry, pull request watches) runs on fake providers and discovery specs from @t3tools/source-control-testing/fakeSourceControlDriver, and GitManager asserts the selectors it asks a host for instead of gh argv. Forge packages now export only client/definition and server/driver; the built-in drivers testkit and the drivers' makeInstance exports are gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 6f55f5e commit bafa558

45 files changed

Lines changed: 2672 additions & 2530 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/server/src/assets/AssetAccess.test.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { assetFileResponse } from "../http.ts";
3434
import { ASSET_ROUTE_PREFIX, issueAssetUrl, readMcpAppHtml, resolveAsset } from "./AssetAccess.ts";
3535
import * as NativeAppIconResolver from "./NativeAppIconResolver.ts";
3636
import { symlinksSupported } from "@t3tools/shared/testing/symlinks";
37-
import type { SourceControlDriverInstance } from "@t3tools/source-control-core/server/driver";
37+
import { fakeSourceControlDriverInstance } from "@t3tools/source-control-testing/fakeSourceControlDriver";
3838
import * as BuiltInDrivers from "../sourceControl/builtInDrivers.ts";
3939
import { sourceControlClients } from "../sourceControl/sourceControlClients.ts";
4040
import { sourceControlMediaResponse } from "./sourceControlMediaResponse.ts";
@@ -957,9 +957,7 @@ describe("AssetAccess", () => {
957957
const layerDrivers = Layer.succeed(BuiltInDrivers.SourceControlDrivers, [
958958
{
959959
driver: { kind: media.definition.kind, definition: media.definition },
960-
instance: {
961-
sourceControl: {} as SourceControlDriverInstance["sourceControl"],
962-
discovery: {} as SourceControlDriverInstance["discovery"],
960+
instance: fakeSourceControlDriverInstance(media.definition.kind, {
963961
pullRequests: null,
964962
fetchMedia: (request) =>
965963
Effect.sync(() => {
@@ -969,7 +967,7 @@ describe("AssetAccess", () => {
969967
new Response("bytes", { status: 206, headers: { "content-length": "5" } }),
970968
);
971969
}),
972-
},
970+
}),
973971
},
974972
]);
975973
return Effect.gen(function* () {

0 commit comments

Comments
 (0)