diff --git a/src/testRunner/unittests/tsbuild/emptyFiles.ts b/src/testRunner/unittests/tsbuild/emptyFiles.ts index 9740893bdb6..ffd9429a344 100644 --- a/src/testRunner/unittests/tsbuild/emptyFiles.ts +++ b/src/testRunner/unittests/tsbuild/emptyFiles.ts @@ -10,14 +10,14 @@ namespace ts { verifyTsc({ scenario: "emptyFiles", - subScenario: "does not have empty files diagnostic when files is empty and references are provided", + subScenario: "has empty files diagnostic when files is empty and no references are provided", fs: () => projFs, commandLineArgs: ["--b", "/src/no-references"], }); verifyTsc({ scenario: "emptyFiles", - subScenario: "has empty files diagnostic when files is empty and no references are provided", + subScenario: "does not have empty files diagnostic when files is empty and references are provided", fs: () => projFs, commandLineArgs: ["--b", "/src/with-references"], }); diff --git a/tests/baselines/reference/tsbuild/emptyFiles/initial-build/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js b/tests/baselines/reference/tsbuild/emptyFiles/initial-build/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js index 6db6e8fe608..8760280f3de 100644 --- a/tests/baselines/reference/tsbuild/emptyFiles/initial-build/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js +++ b/tests/baselines/reference/tsbuild/emptyFiles/initial-build/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js @@ -1,6 +1,49 @@ //// [/lib/initial-buildOutput.txt] -/lib/tsc --b /src/no-references -src/no-references/tsconfig.json(3,14): error TS18002: The 'files' list in config file '/src/no-references/tsconfig.json' is empty. -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped +/lib/tsc --b /src/with-references +exitCode:: ExitStatus.Success +//// [/src/core/index.d.ts] +export declare function multiply(a: number, b: number): number; +//# sourceMappingURL=index.d.ts.map + +//// [/src/core/index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} + +//// [/src/core/index.js] +"use strict"; +exports.__esModule = true; +function multiply(a, b) { return a * b; } +exports.multiply = multiply; + + +//// [/src/core/tsconfig.tsbuildinfo] +{ + "program": { + "fileInfos": { + "../../lib/lib.d.ts": { + "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", + "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" + }, + "./index.ts": { + "version": "5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n", + "signature": "3361149553-export declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" + } + }, + "options": { + "composite": true, + "declaration": true, + "declarationMap": true, + "skipDefaultLibCheck": true, + "configFilePath": "./tsconfig.json" + }, + "referencedMap": {}, + "exportedModulesMap": {}, + "semanticDiagnosticsPerFile": [ + "../../lib/lib.d.ts", + "./index.ts" + ] + }, + "version": "FakeTSVersion" +} + diff --git a/tests/baselines/reference/tsbuild/emptyFiles/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js b/tests/baselines/reference/tsbuild/emptyFiles/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js index 8760280f3de..6db6e8fe608 100644 --- a/tests/baselines/reference/tsbuild/emptyFiles/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js +++ b/tests/baselines/reference/tsbuild/emptyFiles/initial-build/has-empty-files-diagnostic-when-files-is-empty-and-no-references-are-provided.js @@ -1,49 +1,6 @@ //// [/lib/initial-buildOutput.txt] -/lib/tsc --b /src/with-references -exitCode:: ExitStatus.Success +/lib/tsc --b /src/no-references +src/no-references/tsconfig.json(3,14): error TS18002: The 'files' list in config file '/src/no-references/tsconfig.json' is empty. +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped -//// [/src/core/index.d.ts] -export declare function multiply(a: number, b: number): number; -//# sourceMappingURL=index.d.ts.map - -//// [/src/core/index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} - -//// [/src/core/index.js] -"use strict"; -exports.__esModule = true; -function multiply(a, b) { return a * b; } -exports.multiply = multiply; - - -//// [/src/core/tsconfig.tsbuildinfo] -{ - "program": { - "fileInfos": { - "../../lib/lib.d.ts": { - "version": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };", - "signature": "3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };" - }, - "./index.ts": { - "version": "5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n", - "signature": "3361149553-export declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" - } - }, - "options": { - "composite": true, - "declaration": true, - "declarationMap": true, - "skipDefaultLibCheck": true, - "configFilePath": "./tsconfig.json" - }, - "referencedMap": {}, - "exportedModulesMap": {}, - "semanticDiagnosticsPerFile": [ - "../../lib/lib.d.ts", - "./index.ts" - ] - }, - "version": "FakeTSVersion" -} -