Skip to content

Commit 27d3454

Browse files
authored
Add baselines per root for affected file watching (#53616)
1 parent 9052ef8 commit 27d3454

5 files changed

+2782
-5
lines changed

src/testRunner/unittests/canWatch.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ describe("unittests:: canWatch::", () => {
4141
(paths, longestPathLength, baseline) => {
4242
const testType = "canWatchAffectingLocation";
4343
const maxLengths = [longestPathLength + "/package.json".length, testType.length] as const;
44-
pushHeader(baseline, ["File", testType], maxLengths);
45-
paths.forEach(path => {
46-
path = combinePaths(path, "package.json");
47-
pushRow(baseline, [path, `${ts.canWatchAffectingLocation(path)}`], maxLengths);
44+
baselineCanWatchForRoot(paths, baseline, _root => {
45+
pushHeader(baseline, ["File", testType], maxLengths);
46+
paths.forEach(path => {
47+
path = combinePaths(path, "package.json");
48+
pushRow(baseline, [path, `${ts.canWatchAffectingLocation(path)}`], maxLengths);
49+
});
4850
});
49-
baseline.push("", "");
5051
},
5152
);
5253

0 commit comments

Comments
 (0)