mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-01 03:54:20 -05:00
Fixes the tests that got disabled when generating config set es2016 expecting to find libFile and remove incorrect affects flag from listFilesOnly (#51243)
* Fix the existing test * Remove affectsEmit from listFilesOnly
This commit is contained in:
@@ -6,6 +6,10 @@ namespace ts {
|
||||
storeFilesChangingSignatureDuringEmit?: boolean;
|
||||
};
|
||||
|
||||
export function compilerOptionsToConfigJson(options: CompilerOptions) {
|
||||
return optionMapToObject(serializeCompilerOptions(options));
|
||||
}
|
||||
|
||||
export const noChangeRun: TestTscEdit = {
|
||||
subScenario: "no-change-run",
|
||||
modifyFs: noop
|
||||
|
||||
@@ -19,5 +19,26 @@ namespace ts {
|
||||
}),
|
||||
commandLineArgs: ["/src/test.ts", "--listFilesOnly"]
|
||||
});
|
||||
|
||||
verifyTscWithEdits({
|
||||
scenario: "listFilesOnly",
|
||||
subScenario: "combined with incremental",
|
||||
fs: () => loadProjectFromFiles({
|
||||
"/src/test.ts": `export const x = 1;`,
|
||||
"/src/tsconfig.json": "{}"
|
||||
}),
|
||||
commandLineArgs: ["-p", "/src", "--incremental", "--listFilesOnly"],
|
||||
edits: [
|
||||
{
|
||||
...noChangeRun,
|
||||
commandLineArgs: ["-p", "/src", "--incremental"],
|
||||
},
|
||||
noChangeRun,
|
||||
{
|
||||
...noChangeRun,
|
||||
commandLineArgs: ["-p", "/src", "--incremental"],
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1164,7 +1164,9 @@ declare const eval: any`
|
||||
};
|
||||
const tsconfig: File = {
|
||||
path: `${projectRoot}/tsconfig.json`,
|
||||
content: generateTSConfig(options, emptyArray, "\n")
|
||||
content: JSON.stringify({
|
||||
compilerOptions: compilerOptionsToConfigJson(options)
|
||||
})
|
||||
};
|
||||
return createWatchedSystem([file1, file2, libFile, tsconfig], { currentDirectory: projectRoot });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user