@@ -30,11 +30,6 @@ import { LspController } from 'aws-core-vscode/amazonq'
3030let tempFolder : string
3131
3232describe ( 'crossFileContextUtil' , function ( ) {
33- const fakeCancellationToken : vscode . CancellationToken = {
34- isCancellationRequested : false ,
35- onCancellationRequested : sinon . spy ( ) ,
36- }
37-
3833 let mockEditor : vscode . TextEditor
3934 let clock : FakeTimers . InstalledClock
4035
@@ -68,7 +63,7 @@ describe('crossFileContextUtil', function () {
6863
6964 await assertTabCount ( 2 )
7065
71- const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor , fakeCancellationToken )
66+ const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor )
7267 assert . ok ( actual )
7368 assert . strictEqual ( actual . supplementalContextItems . length , 3 )
7469 assert . strictEqual ( actual . supplementalContextItems [ 0 ] . content . split ( '\n' ) . length , 50 )
@@ -96,7 +91,7 @@ describe('crossFileContextUtil', function () {
9691 } ,
9792 ] )
9893
99- const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor , fakeCancellationToken )
94+ const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor )
10095 assert . ok ( actual )
10196 assert . strictEqual ( actual . supplementalContextItems . length , 3 )
10297 assert . strictEqual ( actual ?. strategy , 'codemap' )
@@ -149,7 +144,7 @@ describe('crossFileContextUtil', function () {
149144 } ,
150145 ] )
151146
152- const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor , fakeCancellationToken )
147+ const actual = await crossFile . fetchSupplementalContextForSrc ( myCurrentEditor )
153148 assert . ok ( actual )
154149 assert . strictEqual ( actual . supplementalContextItems . length , 5 )
155150 assert . strictEqual ( actual ?. strategy , 'bm25' )
@@ -188,14 +183,14 @@ describe('crossFileContextUtil', function () {
188183 describe ( 'non supported language should return undefined' , function ( ) {
189184 it ( 'c++' , async function ( ) {
190185 mockEditor = createMockTextEditor ( 'content' , 'fileName' , 'cpp' )
191- const actual = await crossFile . fetchSupplementalContextForSrc ( mockEditor , fakeCancellationToken )
186+ const actual = await crossFile . fetchSupplementalContextForSrc ( mockEditor )
192187 assert . strictEqual ( actual , undefined )
193188 } )
194189
195190 it ( 'ruby' , async function ( ) {
196191 mockEditor = createMockTextEditor ( 'content' , 'fileName' , 'ruby' )
197192
198- const actual = await crossFile . fetchSupplementalContextForSrc ( mockEditor , fakeCancellationToken )
193+ const actual = await crossFile . fetchSupplementalContextForSrc ( mockEditor )
199194
200195 assert . strictEqual ( actual , undefined )
201196 } )
@@ -286,7 +281,7 @@ describe('crossFileContextUtil', function () {
286281
287282 await assertTabCount ( 4 )
288283
289- const actual = await crossFile . fetchSupplementalContextForSrc ( editor , fakeCancellationToken )
284+ const actual = await crossFile . fetchSupplementalContextForSrc ( editor )
290285
291286 assert . ok ( actual && actual . supplementalContextItems . length === 0 )
292287 } )
@@ -317,7 +312,7 @@ describe('crossFileContextUtil', function () {
317312
318313 await assertTabCount ( 4 )
319314
320- const actual = await crossFile . fetchSupplementalContextForSrc ( editor , fakeCancellationToken )
315+ const actual = await crossFile . fetchSupplementalContextForSrc ( editor )
321316
322317 assert . ok ( actual && actual . supplementalContextItems . length !== 0 )
323318 } )
@@ -360,7 +355,7 @@ describe('crossFileContextUtil', function () {
360355
361356 await assertTabCount ( 4 )
362357
363- const actual = await crossFile . fetchSupplementalContextForSrc ( editor , fakeCancellationToken )
358+ const actual = await crossFile . fetchSupplementalContextForSrc ( editor )
364359
365360 assert . ok ( actual && actual . supplementalContextItems . length !== 0 )
366361 } )
0 commit comments