Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit afc80ee

Browse files
committed
fixes
1 parent 027fdbc commit afc80ee

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

lib/shared/src/cody-ignore/context-filters-provider.test.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import { type Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vite
44
import { URI } from 'vscode-uri'
55

66
import { mockAuthStatus } from '../auth/authStatus'
7-
import { AUTH_STATUS_FIXTURE_AUTHED, AUTH_STATUS_FIXTURE_AUTHED_DOTCOM } from '../auth/types'
7+
import { AUTH_STATUS_FIXTURE_AUTHED } from '../auth/types'
88
import { isDefined } from '../common'
99
import { mockResolvedConfig } from '../configuration/resolver'
10-
import { DOTCOM_URL } from '../sourcegraph-api/environments'
1110
import {
1211
type ContextFilters,
1312
DURABLE_REFETCH_INTERVAL_HINT,
@@ -371,25 +370,6 @@ describe('ContextFiltersProvider', () => {
371370
expect(await provider.isUriIgnored(uri)).toBe('repo:github.com/sourcegraph/whatever')
372371
})
373372

374-
it(
375-
'includes everything on dotcom when initial fetch is not complete',
376-
{ timeout: 1000 },
377-
async () => {
378-
const foreverPromise = new Promise(() => {}) // We will never resolve this
379-
vi.spyOn(graphqlClient, 'fetchSourcegraphAPI').mockReturnValue(foreverPromise)
380-
mockResolvedConfig({
381-
configuration: {},
382-
auth: { serverEndpoint: DOTCOM_URL.toString() },
383-
})
384-
mockAuthStatus(AUTH_STATUS_FIXTURE_AUTHED_DOTCOM)
385-
provider = new ContextFiltersProvider()
386-
await provider.isRepoNameIgnored('anything')
387-
388-
const uri = getTestURI({ repoName: 'whatever', filePath: 'foo/bar.ts' })
389-
expect(await provider.isUriIgnored(uri)).toBe(false)
390-
}
391-
)
392-
393373
it('excludes everything on unknown API errors', async () => {
394374
const error = new Error('API error message')
395375
vi.spyOn(graphqlClient, 'fetchSourcegraphAPI').mockResolvedValue(error)

0 commit comments

Comments
 (0)