diff --git a/tests/cases/unittests/transpile.ts b/tests/cases/unittests/transpile.ts index eca136649f2..c906c03a9e0 100644 --- a/tests/cases/unittests/transpile.ts +++ b/tests/cases/unittests/transpile.ts @@ -19,33 +19,33 @@ module ts { it("Generates correct compilerOptions diagnostics", () => { // Expecting 5047: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." - runTest(`var x = 0;`, {}, /*expectedOutput*/ undefined, [5047]); + runTest(`var x = 0;`, {}, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ [5047]); }); it("Generates no diagnostics with valid inputs", () => { // No errors - runTest(`var x = 0;`, { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []); + runTest(`var x = 0;`, { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []); }); it("Generates no diagnostics for missing file references", () => { runTest(`/// var x = 0;`, - { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []); + { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []); }); it("Generates no diagnostics for missing module imports", () => { runTest(`import {a} from "module2";`, - { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []); + { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []); }); it("Generates expected syntactic diagnostics", () => { runTest(`a b`, - { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, [1005]); /// 1005: ';' Expected + { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ [1005]); /// 1005: ';' Expected }); it("Does not generate semantic diagnostics", () => { runTest(`var x: string = 0;`, - { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []); + { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []); }); it("Generates module output", () => { @@ -53,7 +53,7 @@ var x = 0;`, }); it("Uses correct newLine character", () => { - runTest(`var x = 0;`, { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed }, `var x = 0;\n`); + runTest(`var x = 0;`, { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed }, `var x = 0;\n`, /*expectedDiagnosticCodes*/ []); }); }); }