Skip to content

Commit 6902b05

Browse files
committed
Respond to code review comments
1 parent c83054c commit 6902b05

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/cases/unittests/transpile.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,41 +19,41 @@ module ts {
1919

2020
it("Generates correct compilerOptions diagnostics", () => {
2121
// Expecting 5047: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher."
22-
runTest(`var x = 0;`, {}, /*expectedOutput*/ undefined, [5047]);
22+
runTest(`var x = 0;`, {}, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ [5047]);
2323
});
2424

2525
it("Generates no diagnostics with valid inputs", () => {
2626
// No errors
27-
runTest(`var x = 0;`, { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []);
27+
runTest(`var x = 0;`, { module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []);
2828
});
2929

3030
it("Generates no diagnostics for missing file references", () => {
3131
runTest(`/// <reference path="file2.ts" />
3232
var x = 0;`,
33-
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []);
33+
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []);
3434
});
3535

3636
it("Generates no diagnostics for missing module imports", () => {
3737
runTest(`import {a} from "module2";`,
38-
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []);
38+
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []);
3939
});
4040

4141
it("Generates expected syntactic diagnostics", () => {
4242
runTest(`a b`,
43-
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, [1005]); /// 1005: ';' Expected
43+
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ [1005]); /// 1005: ';' Expected
4444
});
4545

4646
it("Does not generate semantic diagnostics", () => {
4747
runTest(`var x: string = 0;`,
48-
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, []);
48+
{ module: ModuleKind.CommonJS }, /*expectedOutput*/ undefined, /*expectedDiagnosticCodes*/ []);
4949
});
5050

5151
it("Generates module output", () => {
5252
runTest(`var x = 0;`, { module: ModuleKind.AMD }, `define(["require", "exports"], function (require, exports) {\r\n var x = 0;\r\n});\r\n`);
5353
});
5454

5555
it("Uses correct newLine character", () => {
56-
runTest(`var x = 0;`, { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed }, `var x = 0;\n`);
56+
runTest(`var x = 0;`, { module: ModuleKind.CommonJS, newLine: NewLineKind.LineFeed }, `var x = 0;\n`, /*expectedDiagnosticCodes*/ []);
5757
});
5858
});
5959
}

0 commit comments

Comments
 (0)