You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 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;`,{},/*moduleName*/undefined,/*expectedOutput*/undefined,/*expectedDiagnosticCodes*/[5047]);
22
+
runTest(`var x = 0;`,{},/*fileName*/undefined,/*moduleName*/undefined,/*expectedOutput*/undefined,/*expectedDiagnosticCodes*/[5047]);
23
23
});
24
24
25
25
it("Generates no diagnostics with valid inputs",()=>{
26
26
// No errors
27
-
runTest(`var x = 0;`,{module: ModuleKind.CommonJS},/*moduleName*/undefined,/*expectedOutput*/undefined,/*expectedDiagnosticCodes*/[]);
27
+
runTest(`var x = 0;`,{module: ModuleKind.CommonJS},/*fileName*/undefined,/*moduleName*/undefined,/*expectedOutput*/undefined,/*expectedDiagnosticCodes*/[]);
28
28
});
29
29
30
30
it("Generates no diagnostics for missing file references",()=>{
runTest(`var x = 0;`,{module: ModuleKind.AMD},/*moduleName*/undefined,`define(["require", "exports"], function (require, exports) {\r\n var x = 0;\r\n});\r\n`);
52
+
runTest(`var x = 0;`,{module: ModuleKind.AMD},/*fileName*/undefined,/*moduleName*/undefined,`define(["require", "exports"], function (require, exports) {\r\n var x = 0;\r\n});\r\n`);
53
53
});
54
54
55
55
it("Uses correct newLine character",()=>{
56
-
runTest(`var x = 0;`,{module: ModuleKind.CommonJS,newLine: NewLineKind.LineFeed},/*moduleName*/undefined,`var x = 0;\n`,/*expectedDiagnosticCodes*/[]);
56
+
runTest(`var x = 0;`,{module: ModuleKind.CommonJS,newLine: NewLineKind.LineFeed},/*fileName*/undefined,/*moduleName*/undefined,`var x = 0;\n`,/*expectedDiagnosticCodes*/[]);
57
57
});
58
58
59
59
it("Sets module name",()=>{
@@ -66,7 +66,11 @@ var x = 0;`,
66
66
` }\n`+
67
67
` }\n`+
68
68
`});\n`;
69
-
runTest("var x = 1;",{module: ModuleKind.System,newLine: NewLineKind.LineFeed},"NamedModule",output)
69
+
runTest("var x = 1;",{module: ModuleKind.System,newLine: NewLineKind.LineFeed},/*fileName*/undefined,"NamedModule",output)
70
70
});
71
+
it("No extra errors for file without extension",()=>{
72
+
runTest(`var x = 0;`,{module: ModuleKind.CommonJS},"file",/*moduleName*/undefined,/*expectedOutput*/undefined,/*expectedDiagnosticCodes*/[]);
0 commit comments