Skip to content

Commit 504adfc

Browse files
committed
fix test
1 parent 53c01f1 commit 504adfc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

jscomp/test/Import.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,22 @@ var each = import("../../lib/js/belt_List.js").then(function (m) {
66
return m.forEach;
77
});
88

9+
function eachInt(list, f) {
10+
var arg1 = function (each) {
11+
return Promise.resolve(Curry._2(each, list, f));
12+
};
13+
return each.then(arg1);
14+
}
15+
916
var beltAsModule = import("../../lib/js/belt_List.js");
1017

11-
async function eachInt(list, f) {
18+
async function eachIntAsync(list, f) {
1219
var each$1 = await each;
1320
return Curry._2(each$1, list, f);
1421
}
1522

1623
exports.each = each;
17-
exports.beltAsModule = beltAsModule;
1824
exports.eachInt = eachInt;
25+
exports.beltAsModule = beltAsModule;
26+
exports.eachIntAsync = eachIntAsync;
1927
/* No side effect */

jscomp/test/Import.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ module type BeltList = module type of Belt.List
77

88
let beltAsModule = Js.import(module(Belt.List: BeltList))
99

10-
let eachInt = async (list: list<int>, f: int => unit) => {
10+
let eachIntAsync = async (list: list<int>, f: int => unit) => {
1111
let each = await each
1212
list->each(f)
1313
}
1414

1515
let eachLazy = () => Js.import(Belt.List.forEach)
1616

17-
let eachInt = (list: list<int>, f: int => unit) =>
17+
let eachIntLazy = (list: list<int>, f: int => unit) =>
1818
eachLazy() |> Js.Promise.then_(each => list->each(f)->Js.Promise.resolve)

0 commit comments

Comments
 (0)