1namespace ts.tscWatch { 2 describe("unittests:: tsbuildWatch:: watchMode:: with reexport when referenced project reexports definitions from another file", () => { 3 verifyTscWatch({ 4 scenario: "reexport", 5 subScenario: "Reports errors correctly", 6 commandLineArgs: ["-b", "-w", "-verbose", "src"], 7 sys: () => createWatchedSystem( 8 [ 9 ...[ 10 "src/tsconfig.json", 11 "src/main/tsconfig.json", "src/main/index.ts", 12 "src/pure/tsconfig.json", "src/pure/index.ts", "src/pure/session.ts" 13 ] 14 .map(f => TestFSWithWatch.getTsBuildProjectFile("reexport", f)), 15 { path: libFile.path, content: libContent } 16 ], 17 { currentDirectory: `${TestFSWithWatch.tsbuildProjectsLocation}/reexport` } 18 ), 19 changes: [ 20 { 21 caption: "Introduce error", 22 change: sys => replaceFileText(sys, `${TestFSWithWatch.tsbuildProjectsLocation}/reexport/src/pure/session.ts`, "// ", ""), 23 timeouts: sys => { 24 sys.checkTimeoutQueueLengthAndRun(1); // build src/pure 25 sys.checkTimeoutQueueLengthAndRun(1); // build src/main and src 26 sys.checkTimeoutQueueLength(0); 27 }, 28 }, 29 { 30 caption: "Fix error", 31 change: sys => replaceFileText(sys, `${TestFSWithWatch.tsbuildProjectsLocation}/reexport/src/pure/session.ts`, "bar: ", "// bar: "), 32 timeouts: sys => { 33 sys.checkTimeoutQueueLengthAndRun(1); // build src/pure 34 sys.checkTimeoutQueueLengthAndRun(1); // build src/main and src 35 sys.checkTimeoutQueueLength(0); 36 }, 37 } 38 ] 39 }); 40 }); 41}