We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edf1178 commit 5ee274aCopy full SHA for 5ee274a
test/unit/modules.spec.ts
@@ -1,6 +1,6 @@
1
import { Expect, Test, TestCase } from "alsatian";
2
import * as ts from "typescript";
3
-import { LuaTarget, LuaTranspiler } from "../../src/Transpiler";
+
4
import * as util from "../src/util";
5
6
export class LuaModuleTests {
@@ -34,4 +34,13 @@ export class LuaModuleTests {
34
Expect(() => transpiler.transpileImport(mockDeclaration as ts.ImportDeclaration))
35
.toThrowError(Error, "Unsupported import type.");
36
}
37
38
+ @Test("Non-exported module")
39
+ public nonExportedModule() {
40
+ const lua = util.transpileString("module g { export function test() { return 3; } } return g.test();");
41
42
+ const result = util.executeLua(lua);
43
44
+ Expect(result).toBe(3);
45
+ }
46
0 commit comments