mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Add test for #30457
This commit is contained in:
parent
4b10145340
commit
758bd99879
@ -2,7 +2,7 @@ namespace ts {
|
||||
describe("unittests:: tsc:: incremental::", () => {
|
||||
verifyTscIncrementalEdits({
|
||||
scenario: "incremental",
|
||||
subScenario: "when passing passing filename for buildinfo on commandline",
|
||||
subScenario: "when passing filename for buildinfo on commandline",
|
||||
fs: () => loadProjectFromFiles({
|
||||
"/src/project/src/main.ts": "export const x = 10;",
|
||||
"/src/project/tsconfig.json": utils.dedent`
|
||||
@ -22,5 +22,21 @@ namespace ts {
|
||||
modifyFs: noop,
|
||||
}]
|
||||
});
|
||||
|
||||
verifyTsc({
|
||||
scenario: "incremental",
|
||||
subScenario: "when passing rootDir from commandline",
|
||||
fs: () => loadProjectFromFiles({
|
||||
"/src/project/src/main.ts": "export const x = 10;",
|
||||
"/src/project/tsconfig.json": utils.dedent`
|
||||
{
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"outDir": "dist",
|
||||
},
|
||||
}`,
|
||||
}),
|
||||
commandLineArgs: ["--p", "src/project", "--rootDir", "src/project/src"],
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
//// [/lib/initial-buildOutput.txt]
|
||||
/lib/tsc --p src/project --rootDir src/project/src
|
||||
exitCode:: 0
|
||||
|
||||
|
||||
//// [/src/project/dist/main.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.x = 10;
|
||||
|
||||
|
||||
//// [/src/project/tsconfig.tsbuildinfo]
|
||||
{
|
||||
"program": {
|
||||
"fileInfos": {
|
||||
"../../lib/lib.d.ts": {
|
||||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
|
||||
"signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };"
|
||||
},
|
||||
"./src/main.ts": {
|
||||
"version": "-10726455937-export const x = 10;",
|
||||
"signature": "-6057683066-export declare const x = 10;\r\n"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"incremental": true,
|
||||
"outDir": "./dist",
|
||||
"project": "./",
|
||||
"rootDir": "./src",
|
||||
"configFilePath": "./tsconfig.json"
|
||||
},
|
||||
"referencedMap": {},
|
||||
"exportedModulesMap": {},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
"../../lib/lib.d.ts",
|
||||
"./src/main.ts"
|
||||
]
|
||||
},
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user