@@ -14,6 +14,7 @@ import {
1414 libFile ,
1515 SymLink ,
1616 TestServerHost ,
17+ TestServerHostOsFlavor ,
1718 Tsc_WatchDirectory ,
1819 Tsc_WatchFile ,
1920} from "../helpers/virtualFileSystemWithWatch" ;
@@ -162,7 +163,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
162163 const files = [ file , configFile , libFile ] ;
163164 const environmentVariables = new Map < string , string > ( ) ;
164165 environmentVariables . set ( "TSC_WATCHDIRECTORY" , tscWatchDirectory ) ;
165- return createWatchedSystem ( files , { environmentVariables } ) ;
166+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux , environmentVariables } ) ;
166167 } ,
167168 edits : [
168169 {
@@ -230,7 +231,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
230231 const files = [ libFile , file1 , tsconfig , realA , realB , symLinkA , symLinkB , symLinkBInA , symLinkAInB ] ;
231232 const environmentVariables = new Map < string , string > ( ) ;
232233 environmentVariables . set ( "TSC_WATCHDIRECTORY" , Tsc_WatchDirectory . NonRecursiveWatchDirectory ) ;
233- return createWatchedSystem ( files , { environmentVariables, currentDirectory : cwd } ) ;
234+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux , environmentVariables, currentDirectory : cwd } ) ;
234235 } ,
235236 } ) ;
236237
@@ -252,7 +253,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
252253 content : `export const x = 10;` ,
253254 } ;
254255 const files = [ libFile , file1 , file2 , configFile ] ;
255- return createWatchedSystem ( files , { runWithoutRecursiveWatches : true } ) ;
256+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux } ) ;
256257 } ,
257258 edits : [
258259 {
@@ -330,7 +331,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
330331 content : `export const x = 10;` ,
331332 } ;
332333 const files = [ libFile , file1 , file2 , configFile ] ;
333- return createWatchedSystem ( files , { runWithoutRecursiveWatches : true } ) ;
334+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux } ) ;
334335 } ,
335336 edits : [
336337 noopChange ,
@@ -371,7 +372,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
371372 content : `export const x = 10;` ,
372373 } ;
373374 const files = [ libFile , file1 , file2 , configFile ] ;
374- return createWatchedSystem ( files , { runWithoutRecursiveWatches : true } ) ;
375+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux } ) ;
375376 } ,
376377 edits : [
377378 noopChange ,
@@ -427,7 +428,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
427428 } ) ,
428429 } ;
429430 const files = [ libFile , commonFile1 , commonFile2 , configFile ] ;
430- return createWatchedSystem ( files , { runWithoutRecursiveWatches : true } ) ;
431+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux } ) ;
431432 } ,
432433 } ) ;
433434
@@ -445,7 +446,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
445446 } ) ,
446447 } ;
447448 const files = [ libFile , commonFile1 , commonFile2 , configFile ] ;
448- return createWatchedSystem ( files , { runWithoutRecursiveWatches : true , runWithFallbackPolling : true } ) ;
449+ return createWatchedSystem ( files , { osFlavor : TestServerHostOsFlavor . Linux , runWithFallbackPolling : true } ) ;
449450 } ,
450451 } ) ;
451452
@@ -464,7 +465,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
464465 } ) ;
465466
466467 describe ( "exclude options" , ( ) => {
467- function sys ( watchOptions : ts . WatchOptions , runWithoutRecursiveWatches ?: boolean ) : TestServerHost {
468+ function sys ( watchOptions : ts . WatchOptions , osFlavor ?: TestServerHostOsFlavor . Linux ) : TestServerHost {
468469 const configFile : File = {
469470 path : `/user/username/projects/myproject/tsconfig.json` ,
470471 content : jsonToReadableText ( { exclude : [ "node_modules" ] , watchOptions } ) ,
@@ -490,7 +491,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
490491 content : "export function temp(): string;" ,
491492 } ;
492493 const files = [ libFile , main , bar , foo , fooBar , temp , configFile ] ;
493- return createWatchedSystem ( files , { currentDirectory : "/user/username/projects/myproject" , runWithoutRecursiveWatches } ) ;
494+ return createWatchedSystem ( files , { currentDirectory : "/user/username/projects/myproject" , osFlavor } ) ;
494495 }
495496
496497 function verifyWorker ( ...additionalFlags : string [ ] ) {
@@ -526,7 +527,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
526527 scenario,
527528 subScenario : `watchOptions/with excludeDirectories option with recursive directory watching${ additionalFlags . join ( "" ) } ` ,
528529 commandLineArgs : [ "-w" , ...additionalFlags ] ,
529- sys : ( ) => sys ( { excludeDirectories : [ "**/temp" ] } , /*runWithoutRecursiveWatches*/ true ) ,
530+ sys : ( ) => sys ( { excludeDirectories : [ "**/temp" ] } , TestServerHostOsFlavor . Linux ) ,
530531 edits : [
531532 {
532533 caption : "Directory watch updates because of main.js creation" ,
@@ -599,7 +600,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
599600 } ,
600601 {
601602 currentDirectory : "/user/username/projects/myproject" ,
602- inodeWatching : true ,
603+ osFlavor : TestServerHostOsFlavor . MacOs ,
603604 } ,
604605 ) ,
605606 edits : [
@@ -630,7 +631,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
630631 } ,
631632 {
632633 currentDirectory : "/user/username/projects/myproject" ,
633- inodeWatching : true ,
634+ osFlavor : TestServerHostOsFlavor . MacOs ,
634635 } ,
635636 ) ,
636637 edits : [
@@ -664,7 +665,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
664665 } ,
665666 {
666667 currentDirectory : "/user/username/projects/myproject" ,
667- inodeWatching : true ,
668+ osFlavor : TestServerHostOsFlavor . MacOs ,
668669 } ,
669670 ) ,
670671 edits : [
@@ -690,10 +691,10 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
690691 } ) ;
691692
692693 describe ( "with fsWatch with fsWatchWithTimestamp" , ( ) => {
693- function verify ( fsWatchWithTimestamp : boolean , watchFile ?: "useFsEventsOnParentDirectory" ) {
694+ function verify ( osFlavor : TestServerHostOsFlavor , watchFile ?: "useFsEventsOnParentDirectory" ) {
694695 verifyTscWatch ( {
695696 scenario,
696- subScenario : `fsWatch/fsWatchWithTimestamp ${ fsWatchWithTimestamp } ${ watchFile ? ` ${ watchFile } ` : "" } ` ,
697+ subScenario : `fsWatch/fsWatchWithTimestamp ${ osFlavor === TestServerHostOsFlavor . MacOs } ${ watchFile ? ` ${ watchFile } ` : "" } ` ,
697698 commandLineArgs : [ "-w" , "--extendedDiagnostics" , ...( watchFile ? [ "--watchFile" , watchFile ] : [ ] ) ] ,
698699 sys : ( ) =>
699700 createWatchedSystem (
@@ -704,7 +705,7 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
704705 } ,
705706 {
706707 currentDirectory : "/user/username/projects/myproject" ,
707- fsWatchWithTimestamp ,
708+ osFlavor ,
708709 } ,
709710 ) ,
710711 edits : [
@@ -721,10 +722,10 @@ describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different po
721722 ] ,
722723 } ) ;
723724 }
724- verify ( /*fsWatchWithTimestamp*/ true ) ;
725- verify ( /*fsWatchWithTimestamp*/ false ) ;
726- verify ( /*fsWatchWithTimestamp*/ true , "useFsEventsOnParentDirectory" ) ;
727- verify ( /*fsWatchWithTimestamp*/ false , "useFsEventsOnParentDirectory" ) ;
725+ verify ( TestServerHostOsFlavor . MacOs ) ;
726+ verify ( TestServerHostOsFlavor . Windows ) ;
727+ verify ( TestServerHostOsFlavor . MacOs , "useFsEventsOnParentDirectory" ) ;
728+ verify ( TestServerHostOsFlavor . Windows , "useFsEventsOnParentDirectory" ) ;
728729 } ) ;
729730
730731 verifyTscWatch ( {
0 commit comments