@@ -4,10 +4,9 @@ import { type Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vite
44import { URI } from 'vscode-uri'
55
66import { 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'
88import { isDefined } from '../common'
99import { mockResolvedConfig } from '../configuration/resolver'
10- import { DOTCOM_URL } from '../sourcegraph-api/environments'
1110import {
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