@@ -195,70 +195,6 @@ interface Array<T> { length: number; [n: number]: T; }`
195
195
checkMap ( caption , arrayToMap ( actual , identity ) , expected , /*eachKeyCount*/ undefined ) ;
196
196
}
197
197
198
- export function checkWatchedFiles ( host : TestServerHost , expectedFiles : readonly string [ ] , additionalInfo ?: string ) {
199
- checkMap ( `watchedFiles:: ${ additionalInfo || "" } ::` , host . watchedFiles , expectedFiles , /*eachKeyCount*/ undefined ) ;
200
- }
201
-
202
- export interface WatchFileDetails {
203
- fileName : string ;
204
- pollingInterval : PollingInterval ;
205
- }
206
- export function checkWatchedFilesDetailed ( host : TestServerHost , expectedFiles : ReadonlyESMap < string , number > , expectedDetails ?: ESMap < string , WatchFileDetails [ ] > ) : void ;
207
- export function checkWatchedFilesDetailed ( host : TestServerHost , expectedFiles : readonly string [ ] , eachFileWatchCount : number , expectedDetails ?: ESMap < string , WatchFileDetails [ ] > ) : void ;
208
- export function checkWatchedFilesDetailed ( host : TestServerHost , expectedFiles : ReadonlyESMap < string , number > | readonly string [ ] , eachFileWatchCountOrExpectedDetails ?: number | ESMap < string , WatchFileDetails [ ] > , expectedDetails ?: ESMap < string , WatchFileDetails [ ] > ) {
209
- if ( ! isNumber ( eachFileWatchCountOrExpectedDetails ) ) expectedDetails = eachFileWatchCountOrExpectedDetails ;
210
- if ( isArray ( expectedFiles ) ) {
211
- checkMap (
212
- "watchedFiles" ,
213
- host . watchedFiles ,
214
- expectedFiles ,
215
- eachFileWatchCountOrExpectedDetails as number ,
216
- [ expectedDetails , ( { fileName, pollingInterval } ) => ( { fileName, pollingInterval } ) ]
217
- ) ;
218
- }
219
- else {
220
- checkMap (
221
- "watchedFiles" ,
222
- host . watchedFiles ,
223
- expectedFiles ,
224
- [ expectedDetails , ( { fileName, pollingInterval } ) => ( { fileName, pollingInterval } ) ]
225
- ) ;
226
- }
227
- }
228
-
229
- export function checkWatchedDirectories ( host : TestServerHost , expectedDirectories : string [ ] , recursive : boolean ) {
230
- checkMap ( `watchedDirectories${ recursive ? " recursive" : "" } ` , recursive ? host . fsWatchesRecursive : host . fsWatches , expectedDirectories , /*eachKeyCount*/ undefined ) ;
231
- }
232
-
233
- export interface WatchDirectoryDetails {
234
- directoryName : string ;
235
- fallbackPollingInterval : PollingInterval ;
236
- fallbackOptions : WatchOptions | undefined ;
237
- }
238
- export function checkWatchedDirectoriesDetailed ( host : TestServerHost , expectedDirectories : ReadonlyESMap < string , number > , recursive : boolean , expectedDetails ?: ESMap < string , WatchDirectoryDetails [ ] > ) : void ;
239
- export function checkWatchedDirectoriesDetailed ( host : TestServerHost , expectedDirectories : readonly string [ ] , eachDirectoryWatchCount : number , recursive : boolean , expectedDetails ?: ESMap < string , WatchDirectoryDetails [ ] > ) : void ;
240
- export function checkWatchedDirectoriesDetailed ( host : TestServerHost , expectedDirectories : ReadonlyESMap < string , number > | readonly string [ ] , recursiveOrEachDirectoryWatchCount : boolean | number , recursiveOrExpectedDetails ?: boolean | ESMap < string , WatchDirectoryDetails [ ] > , expectedDetails ?: ESMap < string , WatchDirectoryDetails [ ] > ) {
241
- if ( typeof recursiveOrExpectedDetails !== "boolean" ) expectedDetails = recursiveOrExpectedDetails ;
242
- if ( isArray ( expectedDirectories ) ) {
243
- checkMap (
244
- `fsWatches${ recursiveOrExpectedDetails ? " recursive" : "" } ` ,
245
- recursiveOrExpectedDetails as boolean ? host . fsWatchesRecursive : host . fsWatches ,
246
- expectedDirectories ,
247
- recursiveOrEachDirectoryWatchCount as number ,
248
- [ expectedDetails , ( { directoryName, fallbackPollingInterval, fallbackOptions } ) => ( { directoryName, fallbackPollingInterval, fallbackOptions } ) ]
249
- ) ;
250
- }
251
- else {
252
- recursiveOrExpectedDetails = recursiveOrEachDirectoryWatchCount as boolean ;
253
- checkMap (
254
- `fsWatches${ recursiveOrExpectedDetails ? " recursive" : "" } ` ,
255
- recursiveOrExpectedDetails ? host . fsWatchesRecursive : host . fsWatches ,
256
- expectedDirectories ,
257
- [ expectedDetails , ( { directoryName, fallbackPollingInterval, fallbackOptions } ) => ( { directoryName, fallbackPollingInterval, fallbackOptions } ) ]
258
- ) ;
259
- }
260
- }
261
-
262
198
export function checkOutputContains ( host : TestServerHost , expected : readonly string [ ] ) {
263
199
const mapExpected = new Set ( expected ) ;
264
200
const mapSeen = new Set < string > ( ) ;
0 commit comments