diff --git a/tests/cases/unittests/tsconfigParsing.ts b/tests/cases/unittests/tsconfigParsing.ts index ec025e0b21..776d9495e8 100644 --- a/tests/cases/unittests/tsconfigParsing.ts +++ b/tests/cases/unittests/tsconfigParsing.ts @@ -170,5 +170,36 @@ namespace ts { ["/apath/.git/a.ts", "/apath/.b.ts", "/apath/..c.ts"] ) }); + + it("always exclude outDir", () => { + const tsconfigWithoutExclude = + `{ + "compilerOptions": { + "outDir": "bin" + } + }`; + const tsconfigWithExclude = + `{ + "compilerOptions": { + "outDir": "bin" + }, + "exclude": [ "obj" ] + }`; + const rootDir = "/"; + const allFiles = ["/bin/a.ts", "/b.ts"]; + const expectedFiles = ["/b.ts"]; + assertParseFileList(tsconfigWithoutExclude, "tsconfig.json", rootDir, allFiles, expectedFiles); + assertParseFileList(tsconfigWithExclude, "tsconfig.json", rootDir, allFiles, expectedFiles); + }) + + it("implicitly exclude common package folders", () => { + assertParseFileList( + `{}`, + "tsconfig.json", + "/", + ["/node_modules/a.ts", "/bower_components/b.ts", "/jspm_packages/c.ts", "/d.ts", "/folder/e.ts"], + ["/d.ts", "/folder/e.ts"] + ) + }) }); }