Skip to content

Commit 0319f10

Browse files
committed
Test case to verify the non local change doesnt build referencing projects
1 parent ef2024a commit 0319f10

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/testRunner/unittests/tsbuildWatchMode.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,22 @@ export class someClass2 { }`);
187187
}
188188
});
189189

190+
it("non local change does not start build of referencing projects", () => {
191+
const host = createSolutionInWatchMode(allFiles);
192+
const outputFileStamps = getOutputFileStamps(host);
193+
host.writeFile(core[1].path, `${core[1].content}
194+
function foo() { }`);
195+
host.checkTimeoutQueueLengthAndRun(1); // Builds core
196+
const changedCore = getOutputFileStamps(host);
197+
verifyChangedFiles(changedCore, outputFileStamps, [
198+
...getOutputFileNames(SubProject.core, "anotherModule"), // This should not be written really
199+
...getOutputFileNames(SubProject.core, "index"),
200+
]);
201+
host.checkTimeoutQueueLength(0);
202+
checkOutputErrorsIncremental(host, emptyArray);
203+
verifyWatches(host);
204+
});
205+
190206
it("builds when new file is added, and its subsequent updates", () => {
191207
const additinalFiles: ReadonlyArray<[SubProject, string]> = [[SubProject.core, newFileWithoutExtension]];
192208
const { verifyChangeWithFile } = createSolutionInWatchModeToVerifyChanges(additinalFiles);

0 commit comments

Comments
 (0)