More directory patterns for testing that we will care about (#53653)

This commit is contained in:
Sheetal Nandi
2023-04-03 15:34:37 -07:00
committed by GitHub
parent 3f7a8d5604
commit acb48f192c
29 changed files with 50293 additions and 7 deletions

View File

@@ -155,13 +155,10 @@ describe("unittests:: canWatch::", () => {
const paths: ts.Path[] = [];
let longestPathLength = 0;
getPathsOfDifferentFoldersAt(osRoot as ts.Path);
osRoot = ts.ensureTrailingDirectorySeparator(osRoot);
const users = combinePaths(osRoot, "users");
paths.push(users);
getPathsOfDifferentFoldersAt(combinePaths(users, "username"));
const user = combinePaths(osRoot, "user");
paths.push(user);
getPathsOfDifferentFoldersAt(combinePaths(user, "username"));
getPathsOfDifferentFoldersWithUsers("users");
getPathsOfDifferentFoldersWithUsers("user");
getPathsOfDifferentFoldersWithUsers("usr");
getPathsOfDifferentFoldersWithUsers("home");
baselineOsRoot(paths, longestPathLength, baseline);
Baseline.runBaseline(`canWatch/${scenario}${suffix}.baseline.md`, baseline.join("\r\n"));
function getPathsOfDifferentFoldersAt(root: ts.Path) {
@@ -174,6 +171,11 @@ describe("unittests:: canWatch::", () => {
}
longestPathLength = Math.max(ts.last(paths).length, longestPathLength);
}
function getPathsOfDifferentFoldersWithUsers(usersType: string) {
const users = combinePaths(osRoot, usersType);
paths.push(users);
getPathsOfDifferentFoldersAt(combinePaths(users, "username"));
}
}
function combinePaths(path: string, addition: string, anotherAddition?: string): ts.Path {