Skip to content

Commit c8c3d22

Browse files
authored
test: update snapshot tests to melange v5 (#875)
1 parent 4f95a34 commit c8c3d22

File tree

3 files changed

+30
-58
lines changed

3 files changed

+30
-58
lines changed

flake.lock

Lines changed: 7 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ppx/test/react.t

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@ Demonstrate how to use the React JSX PPX
4040
4141
function X$App(Props) {
4242
return Belt__Belt_List.toArray(Belt__Belt_List.map({
43-
hd: "Hello!",
44-
tl: {
45-
hd: "This is React!",
46-
tl: /* [] */0
47-
}
48-
}, (function (greeting) {
49-
return JsxRuntime.jsx("h1", {
50-
children: greeting
51-
});
52-
})));
43+
hd: "Hello!",
44+
tl: {
45+
hd: "This is React!",
46+
tl: /* [] */ 0
47+
}
48+
}, (function (greeting) {
49+
return JsxRuntime.jsx("h1", {
50+
children: greeting
51+
});
52+
})));
5353
}
5454
5555
const App = {
@@ -60,5 +60,7 @@ Demonstrate how to use the React JSX PPX
6060
6161
JsxRuntime.jsx(X$App, {});
6262
63-
exports.App = App;
63+
module.exports = {
64+
App,
65+
}
6466
/* Not a pure module */

test/blackbox-tests/useCallback.t

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
const React = require("react");
2525
2626
const cb = React.useCallback((function (a, b) {
27-
return a + b | 0;
28-
}), []);
27+
return a + b | 0;
28+
}), []);
2929
30-
exports.cb = cb;
30+
module.exports = {
31+
cb,
32+
}
3133
/* cb Not a pure module */
3234
3335
Using an Uncurried function:
@@ -45,9 +47,11 @@ Using an Uncurried function:
4547
const React = require("react");
4648
4749
const cb = React.useCallback((function (a, b) {
48-
return a + b | 0;
49-
}), []);
50+
return a + b | 0;
51+
}), []);
5052
51-
exports.cb = cb;
53+
module.exports = {
54+
cb,
55+
}
5256
/* cb Not a pure module */
5357

0 commit comments

Comments
 (0)