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
runTest(`var x = 0;`,{module: ModuleKind.AMD},`define(["require", "exports"], function (require, exports) {\r\n var x = 0;\r\n});\r\n`);
52
+
runTest(`var x = 0;`,{module: ModuleKind.AMD},/*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},`var x = 0;\n`,/*expectedDiagnosticCodes*/[]);
56
+
runTest(`var x = 0;`,{module: ModuleKind.CommonJS,newLine: NewLineKind.LineFeed},/*moduleName*/undefined,`var x = 0;\n`,/*expectedDiagnosticCodes*/[]);
57
+
});
58
+
59
+
it("Sets module name",()=>{
60
+
letoutput=
61
+
`System.register("NamedModule", [], function(exports_1) {\n var x;\n`+
62
+
` return {\n`+
63
+
` setters:[],\n`+
64
+
` execute: function() {\n`+
65
+
` var x = 1;\n`+
66
+
` }\n`+
67
+
` }\n`+
68
+
`});\n`;
69
+
runTest("var x = 1;",{module: ModuleKind.System,newLine: NewLineKind.LineFeed},"NamedModule",output)
0 commit comments