diff --git a/src/testRunner/unittests/tsbuild/missingExtendedFile.ts b/src/testRunner/unittests/tsbuild/missingExtendedFile.ts index 7fa3352da26..398b38fdbea 100644 --- a/src/testRunner/unittests/tsbuild/missingExtendedFile.ts +++ b/src/testRunner/unittests/tsbuild/missingExtendedFile.ts @@ -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"], }); }); } diff --git a/tests/baselines/reference/tsbuild/missingExtendedConfig/initial-build/when-tsconfig-extends-the-missing-file.js b/tests/baselines/reference/tsbuild/missingExtendedConfig/initial-build/when-tsconfig-extends-the-missing-file.js new file mode 100644 index 00000000000..1221147bc8e --- /dev/null +++ b/tests/baselines/reference/tsbuild/missingExtendedConfig/initial-build/when-tsconfig-extends-the-missing-file.js @@ -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 + +