Skip to content

Commit eb7aab1

Browse files
committed
add test non function type will not be injected
1 parent 63e5501 commit eb7aab1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/ts/test/utils/utils.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ describe("supplyDefaultFunction", () => {
8181
{ kind: "function", module: "system", name: "getStatus" },
8282
{ kind: "function", module: "logger", name: "logWarning" },
8383
{ kind: "function", module: "customOps", name: "combineValues" },
84+
{ kind: "global", module: "myenv", name: "globalVar" },
85+
{ kind: "memory", module: "other", name: "memChange" },
8486
];
8587

8688
const mockImportObject: ASImports = {
@@ -97,5 +99,7 @@ describe("supplyDefaultFunction", () => {
9799
expect(typeof mockImportObject["system"]?.["getStatus"]).toBe("function");
98100
expect(typeof mockImportObject["logger"]?.["logWarning"]).toBe("function");
99101
expect(typeof mockImportObject["customOps"]?.["combineValues"]).toBe("function");
102+
expect(mockImportObject["myenv"]?.["globalVar"]).toBeUndefined();
103+
expect(mockImportObject["other"]?.["memChange"]).toBeUndefined();
100104
});
101105
});

0 commit comments

Comments
 (0)