mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Add test for #34502
This commit is contained in:
parent
66ea16a23a
commit
a4044ca684
@ -36,5 +36,23 @@ namespace ts {
|
||||
commandLineArgs: ["--p", "src/project", "--rootDir", "src/project/src"],
|
||||
incrementalScenarios: [noChangeRun]
|
||||
});
|
||||
|
||||
verifyTscIncrementalEdits({
|
||||
scenario: "incremental",
|
||||
subScenario: "when passing rootDir is in the tsconfig",
|
||||
fs: () => loadProjectFromFiles({
|
||||
"/src/project/src/main.ts": "export const x = 10;",
|
||||
"/src/project/tsconfig.json": utils.dedent`
|
||||
{
|
||||
"compilerOptions": {
|
||||
"incremental": true,
|
||||
"outDir": "./built",
|
||||
"rootDir": "./"
|
||||
},
|
||||
}`,
|
||||
}),
|
||||
commandLineArgs: ["--p", "src/project"],
|
||||
incrementalScenarios: [noChangeRun]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
//// [/lib/initial-buildOutput.txt]
|
||||
/lib/tsc --p src/project
|
||||
exitCode:: ExitStatus.Success
|
||||
|
||||
|
||||
//// [/src/project/built/src/main.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports.x = 10;
|
||||
|
||||
|
||||
//// [/src/project/built/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": "./",
|
||||
"rootDir": "..",
|
||||
"project": "..",
|
||||
"configFilePath": "../tsconfig.json"
|
||||
},
|
||||
"referencedMap": {},
|
||||
"exportedModulesMap": {},
|
||||
"semanticDiagnosticsPerFile": [
|
||||
"../../../lib/lib.d.ts",
|
||||
"../src/main.ts"
|
||||
]
|
||||
},
|
||||
"version": "FakeTSVersion"
|
||||
}
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
//// [/lib/no-change-runOutput.txt]
|
||||
/lib/tsc --p src/project
|
||||
exitCode:: ExitStatus.Success
|
||||
|
||||
|
||||
//// [/src/project/built/src/main.js] file written with same contents
|
||||
//// [/src/project/built/tsconfig.tsbuildinfo] file written with same contents
|
||||
Loading…
x
Reference in New Issue
Block a user