diff --git a/apps/web/src/routers/admin-github-router.test.ts b/apps/web/src/routers/admin-github-router.test.ts index 6398d8590b..616817672b 100644 --- a/apps/web/src/routers/admin-github-router.test.ts +++ b/apps/web/src/routers/admin-github-router.test.ts @@ -2,10 +2,8 @@ import { createCallerForUser } from '@/routers/test-utils'; import { insertTestUser } from '@/tests/helpers/user.helper'; import type { User } from '@kilocode/db/schema'; import { - getKilocodeRepoOpenPullRequestCounts, getKilocodeRepoOpenPullRequestsSummary, getKilocodeRepoRecentlyClosedExternalPRs, - getKilocodeRepoRecentlyMergedExternalPRs, } from '@/lib/github/open-pull-request-counts'; jest.mock('@/lib/github/open-pull-request-counts', () => ({ @@ -41,22 +39,6 @@ describe('admin.github.getKilocodeOpenPullRequestCounts', () => { 'Admin access required' ); }); - - it('returns PR counts for admin users', async () => { - const mockCounts = { - totalOpenPullRequests: 10, - teamOpenPullRequests: 4, - externalOpenPullRequests: 6, - updatedAt: new Date('2020-01-01T00:00:00.000Z').toISOString(), - }; - - (getKilocodeRepoOpenPullRequestCounts as jest.Mock).mockResolvedValue(mockCounts); - - const caller = await createCallerForUser(adminUser.id); - const result = await caller.admin.github.getKilocodeOpenPullRequestCounts(); - - expect(result).toEqual(mockCounts); - }); }); describe('admin.github.getKilocodeOpenPullRequestsSummary', () => { @@ -103,32 +85,6 @@ describe('admin.github.getKilocodeRecentlyMergedExternalPRs', () => { 'Admin access required' ); }); - - it('returns recently merged external PRs for admin users', async () => { - const mockMergedPrs = [ - { - number: 456, - title: 'External feature', - url: 'https://github.com/Kilo-Org/kilocode/pull/456', - authorLogin: 'external-contributor', - mergedAt: new Date('2024-01-15T10:00:00.000Z').toISOString(), - }, - { - number: 789, - title: 'Another fix', - url: 'https://github.com/Kilo-Org/kilocode/pull/789', - authorLogin: 'community-dev', - mergedAt: new Date('2024-01-14T08:00:00.000Z').toISOString(), - }, - ]; - - (getKilocodeRepoRecentlyMergedExternalPRs as jest.Mock).mockResolvedValue(mockMergedPrs); - - const caller = await createCallerForUser(adminUser.id); - const result = await caller.admin.github.getKilocodeRecentlyMergedExternalPRs(); - - expect(result).toEqual(mockMergedPrs); - }); }); describe('admin.github.getKilocodeRecentlyClosedExternalPRs', () => { diff --git a/apps/web/src/routers/admin-kiloclaw-providers-router.test.ts b/apps/web/src/routers/admin-kiloclaw-providers-router.test.ts index bbee09d986..545e086c07 100644 --- a/apps/web/src/routers/admin-kiloclaw-providers-router.test.ts +++ b/apps/web/src/routers/admin-kiloclaw-providers-router.test.ts @@ -62,33 +62,6 @@ describe('admin KiloClaw provider rollout router', () => { }); }); - it('returns provider rollout config from the Worker', async () => { - kiloclawClientMock.__getProviderRolloutMock.mockResolvedValue({ - rollout: { - northflank: { - personalTrafficPercent: 0, - organizationTrafficPercent: 0, - enabledOrganizationIds: [], - }, - }, - availability: { northflank: false }, - source: 'default', - }); - const caller = await createCallerForUser(adminUser.id); - - await expect(caller.admin.kiloclawProviders.getRollout()).resolves.toEqual({ - rollout: { - northflank: { - personalTrafficPercent: 0, - organizationTrafficPercent: 0, - enabledOrganizationIds: [], - }, - }, - availability: { northflank: false }, - source: 'default', - }); - }); - it('updates provider rollout config through the Worker', async () => { const input = { northflank: {