mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Add test for current --incremental behaviour
This commit is contained in:
@@ -365,6 +365,23 @@ namespace ts {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("parse --incremental", () => {
|
||||
// --lib es6 0.ts
|
||||
assertParseResult(["--incremental", "0.ts"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Option 'incremental' can only be specified in 'tsconfig.json' file.",
|
||||
category: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file.category,
|
||||
code: Diagnostics.Option_0_can_only_be_specified_in_tsconfig_json_file.code,
|
||||
file: undefined,
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}],
|
||||
fileNames: ["0.ts"],
|
||||
options: {}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => {
|
||||
@@ -456,6 +473,23 @@ namespace ts {
|
||||
});
|
||||
});
|
||||
|
||||
it("parse build with --incremental ", () => {
|
||||
// --lib es6 0.ts
|
||||
assertParseResult(["--incremental", "tests"],
|
||||
{
|
||||
errors: [{
|
||||
messageText: "Unknown build option '--incremental'.",
|
||||
category: Diagnostics.Unknown_build_option_0.category,
|
||||
code: Diagnostics.Unknown_build_option_0.code,
|
||||
file: undefined,
|
||||
start: undefined,
|
||||
length: undefined,
|
||||
}],
|
||||
projects: ["tests"],
|
||||
buildOptions: { }
|
||||
});
|
||||
});
|
||||
|
||||
describe("Combining options that make no sense together", () => {
|
||||
function verifyInvalidCombination(flag1: keyof BuildOptions, flag2: keyof BuildOptions) {
|
||||
it(`--${flag1} and --${flag2} together is invalid`, () => {
|
||||
|
||||
Reference in New Issue
Block a user