missingExtendedConfig to baseline test

This commit is contained in:
Sheetal Nandi
2019-10-16 09:19:49 -07:00
parent 7c0cc4a3b9
commit e3cc4f4730
2 changed files with 21 additions and 12 deletions

View File

@@ -1,17 +1,17 @@
namespace ts {
describe("unittests:: tsbuild:: when tsconfig extends the missing file", () => {
it("unittests:: tsbuild - when tsconfig extends the missing file", () => {
const projFs = loadProjectFromDisk("tests/projects/missingExtendedConfig");
const fs = projFs.shadow();
const host = fakes.SolutionBuilderHost.create(fs);
const builder = createSolutionBuilder(host, ["/src/tsconfig.json"], {});
builder.build();
host.assertDiagnosticMessages(
errorDiagnostic([Diagnostics.The_specified_path_does_not_exist_Colon_0, "/src/foobar.json"]),
errorDiagnostic([Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, "/src/tsconfig.first.json", "[\"**/*\"]", "[]"]),
errorDiagnostic([Diagnostics.The_specified_path_does_not_exist_Colon_0, "/src/foobar.json"]),
errorDiagnostic([Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2, "/src/tsconfig.second.json", "[\"**/*\"]", "[]"])
);
let projFs: vfs.FileSystem;
before(() => {
projFs = loadProjectFromDisk("tests/projects/missingExtendedConfig");
});
after(() => {
projFs = undefined!;
});
verifyTsc({
scenario: "missingExtendedConfig",
subScenario: "when tsconfig extends the missing file",
fs: () => projFs,
commandLineArgs: ["--b", "/src/tsconfig.json"],
});
});
}

View File

@@ -0,0 +1,9 @@
//// [/lib/initial-buildOutput.txt]
/lib/tsc --b /src/tsconfig.json
error TS5058: The specified path does not exist: '/src/foobar.json'.
error TS18003: No inputs were found in config file '/src/tsconfig.first.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'.
error TS5058: The specified path does not exist: '/src/foobar.json'.
error TS18003: No inputs were found in config file '/src/tsconfig.second.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'.
exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped