mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fixing linter and test errors
This commit is contained in:
@@ -50,27 +50,6 @@ namespace ts {
|
||||
const host: ParseConfigHost = new MockParseConfigHost(basePath, true, allFileList);
|
||||
const parsed = ts.parseJsonConfigFileContent(json, host, basePath, /*existingOptions*/ undefined, configFileName);
|
||||
assert.isTrue(arrayIsEqualTo(parsed.fileNames.sort(), expectedFileList.sort()));
|
||||
|
||||
function mockReadDirectory(rootDir: string, extension: string, exclude: string[]): string[] {
|
||||
const result: string[] = [];
|
||||
const fullExcludeDirectories = ts.map(exclude, directory => combinePaths(rootDir, directory));
|
||||
for (const file of allFileList) {
|
||||
let shouldExclude = false;
|
||||
for (const fullExcludeDirectorie of fullExcludeDirectories) {
|
||||
if (file.indexOf(fullExcludeDirectorie) >= 0) {
|
||||
shouldExclude = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shouldExclude) {
|
||||
continue;
|
||||
}
|
||||
if (fileExtensionIs(file, extension)) {
|
||||
result.push(file);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
it("returns empty config for file with only whitespaces", () => {
|
||||
|
||||
Reference in New Issue
Block a user