@@ -13,12 +13,12 @@ import fs from '../../../shared/fs/fs'
1313import * as workspaceUtils from '../../../shared/utilities/workspaceUtils'
1414import * as filesystemUtilities from '../../../shared/filesystemUtilities'
1515
16- describe ( 'FileSearch' , ( ) => {
16+ describe ( 'FileSearch' , function ( ) {
1717 let sandbox : sinon . SinonSandbox
1818 let mockUpdates : Writable
1919 const mockWorkspacePath = '/mock/workspace'
2020
21- beforeEach ( ( ) => {
21+ beforeEach ( function ( ) {
2222 sandbox = sinon . createSandbox ( )
2323
2424 // Create a mock Writable stream for updates
@@ -57,12 +57,12 @@ describe('FileSearch', () => {
5757 sandbox . stub ( filesystemUtilities , 'isInDirectory' ) . returns ( true )
5858 } )
5959
60- afterEach ( ( ) => {
60+ afterEach ( function ( ) {
6161 sandbox . restore ( )
6262 } )
6363
64- describe ( 'constructor' , ( ) => {
65- it ( 'should initialize with provided values' , ( ) => {
64+ describe ( 'constructor' , function ( ) {
65+ it ( 'should initialize with provided values' , function ( ) {
6666 const params : FileSearchParams = {
6767 path : '/test/path' ,
6868 pattern : '.*\\.ts$' ,
@@ -79,7 +79,7 @@ describe('FileSearch', () => {
7979 assert . strictEqual ( ( fileSearch as any ) . pattern . flags , '' )
8080 } )
8181
82- it ( 'should initialize with case insensitive pattern by default' , ( ) => {
82+ it ( 'should initialize with case insensitive pattern by default' , function ( ) {
8383 const params : FileSearchParams = {
8484 path : '/test/path' ,
8585 pattern : '.*\\.ts$' ,
@@ -91,18 +91,18 @@ describe('FileSearch', () => {
9191 } )
9292 } )
9393
94- describe ( 'validate' , ( ) => {
95- it ( 'should throw an error if path is empty' , async ( ) => {
94+ describe ( 'validate' , function ( ) {
95+ it ( 'should throw an error if path is empty' , async function ( ) {
9696 const fileSearch = new FileSearch ( { path : '' , pattern : '.*\\.ts$' } )
9797 await assert . rejects ( async ( ) => await fileSearch . validate ( ) , / P a t h c a n n o t b e e m p t y / )
9898 } )
9999
100- it ( 'should throw an error if path is only whitespace' , async ( ) => {
100+ it ( 'should throw an error if path is only whitespace' , async function ( ) {
101101 const fileSearch = new FileSearch ( { path : ' ' , pattern : '.*\\.ts$' } )
102102 await assert . rejects ( async ( ) => await fileSearch . validate ( ) , / P a t h c a n n o t b e e m p t y / )
103103 } )
104104
105- it ( 'should throw an error if maxDepth is negative' , async ( ) => {
105+ it ( 'should throw an error if maxDepth is negative' , async function ( ) {
106106 const fileSearch = new FileSearch ( {
107107 path : '/test/path' ,
108108 pattern : '.*\\.ts$' ,
@@ -111,7 +111,7 @@ describe('FileSearch', () => {
111111 await assert . rejects ( async ( ) => await fileSearch . validate ( ) , / M a x D e p t h c a n n o t b e n e g a t i v e / )
112112 } )
113113
114- it ( 'should throw an error if path does not exist' , async ( ) => {
114+ it ( 'should throw an error if path does not exist' , async function ( ) {
115115 sandbox . restore ( )
116116 sandbox = sinon . createSandbox ( )
117117 sandbox . stub ( fs , 'existsDir' ) . resolves ( false )
@@ -127,7 +127,7 @@ describe('FileSearch', () => {
127127 )
128128 } )
129129
130- it ( 'should pass validation with valid path and pattern' , async ( ) => {
130+ it ( 'should pass validation with valid path and pattern' , async function ( ) {
131131 const fileSearch = new FileSearch ( {
132132 path : '/valid/path' ,
133133 pattern : '.*\\.ts$' ,
@@ -136,8 +136,8 @@ describe('FileSearch', () => {
136136 } )
137137 } )
138138
139- describe ( 'queueDescription' , ( ) => {
140- it ( 'should write description for recursive search' , ( ) => {
139+ describe ( 'queueDescription' , function ( ) {
140+ it ( 'should write description for recursive search' , function ( ) {
141141 const fileSearch = new FileSearch ( {
142142 path : '/test/path' ,
143143 pattern : '.*\\.ts$' ,
@@ -155,7 +155,7 @@ describe('FileSearch', () => {
155155 sinon . assert . calledOnce ( mockUpdates . end as sinon . SinonSpy )
156156 } )
157157
158- it ( 'should write description for current directory only' , ( ) => {
158+ it ( 'should write description for current directory only' , function ( ) {
159159 const fileSearch = new FileSearch ( {
160160 path : '/test/path' ,
161161 pattern : '.*\\.ts$' ,
@@ -172,7 +172,7 @@ describe('FileSearch', () => {
172172 )
173173 } )
174174
175- it ( 'should write description for limited depth search' , ( ) => {
175+ it ( 'should write description for limited depth search' , function ( ) {
176176 const fileSearch = new FileSearch ( {
177177 path : '/test/path' ,
178178 pattern : '.*\\.ts$' ,
@@ -189,7 +189,7 @@ describe('FileSearch', () => {
189189 )
190190 } )
191191
192- it ( 'should use plural form for multiple levels' , ( ) => {
192+ it ( 'should use plural form for multiple levels' , function ( ) {
193193 const fileSearch = new FileSearch ( {
194194 path : '/test/path' ,
195195 pattern : '.*\\.ts$' ,
@@ -207,8 +207,8 @@ describe('FileSearch', () => {
207207 } )
208208 } )
209209
210- describe ( 'requiresAcceptance' , ( ) => {
211- it ( 'should require acceptance when no workspace folders exist' , ( ) => {
210+ describe ( 'requiresAcceptance' , function ( ) {
211+ it ( 'should require acceptance when no workspace folders exist' , function ( ) {
212212 sandbox . restore ( )
213213 sandbox = sinon . createSandbox ( )
214214 sandbox . stub ( vscode . workspace , 'workspaceFolders' ) . value ( undefined )
@@ -222,7 +222,7 @@ describe('FileSearch', () => {
222222 assert . strictEqual ( result . requiresAcceptance , true )
223223 } )
224224
225- it ( 'should require acceptance when path is outside workspace' , ( ) => {
225+ it ( 'should require acceptance when path is outside workspace' , function ( ) {
226226 sandbox . restore ( )
227227 sandbox = sinon . createSandbox ( )
228228 sandbox . stub ( vscode . workspace , 'workspaceFolders' ) . value ( [
@@ -243,7 +243,7 @@ describe('FileSearch', () => {
243243 assert . strictEqual ( result . requiresAcceptance , true )
244244 } )
245245
246- it ( 'should not require acceptance when path is inside workspace' , ( ) => {
246+ it ( 'should not require acceptance when path is inside workspace' , function ( ) {
247247 const fileSearch = new FileSearch ( {
248248 path : '/mock/workspace/subfolder' ,
249249 pattern : '.*\\.ts$' ,
@@ -254,18 +254,18 @@ describe('FileSearch', () => {
254254 } )
255255 } )
256256
257- describe ( 'invoke' , ( ) => {
257+ describe ( 'invoke' , function ( ) {
258258 let fileSearch : FileSearch
259259
260- beforeEach ( async ( ) => {
260+ beforeEach ( async function ( ) {
261261 fileSearch = new FileSearch ( {
262262 path : '/test/path' ,
263263 pattern : '.*\\.ts$' ,
264264 } )
265265 await fileSearch . validate ( )
266266 } )
267267
268- it ( 'should filter files by regex pattern' , async ( ) => {
268+ it ( 'should filter files by regex pattern' , async function ( ) {
269269 const result = await fileSearch . invoke ( )
270270
271271 // Should only include .ts files
@@ -277,7 +277,7 @@ describe('FileSearch', () => {
277277 } )
278278 } )
279279
280- it ( 'should handle case sensitivity correctly' , async ( ) => {
280+ it ( 'should handle case sensitivity correctly' , async function ( ) {
281281 // Create a case-sensitive search for .TS (uppercase)
282282 fileSearch = new FileSearch ( {
283283 path : '/test/path' ,
@@ -296,7 +296,7 @@ describe('FileSearch', () => {
296296 } )
297297 } )
298298
299- it ( 'should throw an error if file search fails' , async ( ) => {
299+ it ( 'should throw an error if file search fails' , async function ( ) {
300300 sandbox . restore ( )
301301 sandbox = sinon . createSandbox ( )
302302 // Make readDirectoryRecursively throw an error
@@ -315,8 +315,8 @@ describe('FileSearch', () => {
315315 } )
316316 } )
317317
318- describe ( 'createOutput' , ( ) => {
319- it ( 'should create output with content' , ( ) => {
318+ describe ( 'createOutput' , function ( ) {
319+ it ( 'should create output with content' , function ( ) {
320320 const fileSearch = new FileSearch ( {
321321 path : '/test/path' ,
322322 pattern : '.*\\.ts$' ,
@@ -332,7 +332,7 @@ describe('FileSearch', () => {
332332 } )
333333 } )
334334
335- it ( 'should create output with empty content' , ( ) => {
335+ it ( 'should create output with empty content' , function ( ) {
336336 const fileSearch = new FileSearch ( {
337337 path : '/test/path' ,
338338 pattern : '.*\\.ts$' ,
0 commit comments