Skip to content

Commit f881713

Browse files
committed
Remove unused GitLab and BitBucket mocks from unit tests
1 parent f87b516 commit f881713

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

src/clients/multi-index-runner.test.ts

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,24 @@
44
* These tests verify that createSourceFromState correctly uses resolvedRef
55
* from state metadata when creating source instances.
66
*
7-
* The tests mock the source modules to capture what config gets passed
7+
* We mock GitHub and Website sources to capture what config gets passed
88
* to the constructors, without needing API credentials.
9+
*
10+
* Since all VCS sources (GitHub, GitLab, BitBucket) use the same getRef() logic,
11+
* we only test GitHub as the representative case.
912
*/
1013

1114
import { describe, it, expect, vi, beforeEach } from "vitest";
1215
import type { IndexStateSearchOnly, SourceMetadata } from "../core/types.js";
1316

14-
// Mock the source modules to capture constructor calls
17+
// Mock only the sources we actually test
1518
vi.mock("../sources/github.js", () => ({
1619
GitHubSource: vi.fn().mockImplementation((config) => ({
1720
type: "github" as const,
1821
config,
1922
})),
2023
}));
2124

22-
vi.mock("../sources/gitlab.js", () => ({
23-
GitLabSource: vi.fn().mockImplementation((config) => ({
24-
type: "gitlab" as const,
25-
config,
26-
})),
27-
}));
28-
29-
vi.mock("../sources/bitbucket.js", () => ({
30-
BitBucketSource: vi.fn().mockImplementation((config) => ({
31-
type: "bitbucket" as const,
32-
config,
33-
})),
34-
}));
35-
3625
vi.mock("../sources/website.js", () => ({
3726
WebsiteSource: vi.fn().mockImplementation((config) => ({
3827
type: "website" as const,

0 commit comments

Comments
 (0)