Skip to content

Commit 6524cb2

Browse files
committed
add test for dynamic module import
1 parent bf78e61 commit 6524cb2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

jscomp/test/Import.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ eachIntAsync({
4646

4747
var beltAsModule = import("../../lib/js/belt_List.js");
4848

49+
var M;
50+
4951
exports.eachIntAsync = eachIntAsync;
5052
exports.eachIntLazy = eachIntLazy;
5153
exports.beltAsModule = beltAsModule;
54+
exports.M = M;
5255
/* Not a pure module */

jscomp/test/Import.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ let _ = list{1, 2, 3}->eachIntAsync(n => Js.log2("async", n))
1010

1111
module type BeltList = module type of Belt.List
1212
let beltAsModule = Js.import(module(Belt.List: BeltList))
13+
14+
module M = @res.await Belt.List

0 commit comments

Comments
 (0)