Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 41d02e0

Browse files
committed
fix tests
1 parent 9c31a5a commit 41d02e0

8 files changed

+14
-19
lines changed

tests/ppx/react/expected/commentAtTop.res_v4_auto.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type props<'msg> = {key?: string, msg: 'msg} // test React JSX file
22

33
let make = ({msg, _}: props<'msg>) => {
4-
Js.React.jsxDom("div", {children: {msg->React.string}})
4+
JsxDOM.jsx("div", {children: {msg->React.string}})
55
}
66
let make = {
77
let \"CommentAtTop" = (props: props<_>) => make(props)

tests/ppx/react/expected/externalWithCustomName.res_v4_auto.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ module Foo = {
44
external component: React.componentLike<props<'a, 'b>, React.element> = "component"
55
}
66

7-
let t = Js.React.jsx(Foo.component, {a: 1, b: "1"})
7+
let t = Jsx.jsx(Foo.component, {a: 1, b: "1"})

tests/ppx/react/expected/forwardRef.res_v4_auto.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ module FancyInput = {
55
children: 'children,
66
ref?: ReactDOM.Ref.currentDomRef,
77
}
8-
let make = ({?className, children, ref, _}: props<'className, 'children>) => {
8+
let make = ({?className, children, ?ref, _}: props<'className, 'children>) => {
99
let ref = Js.Nullable.fromOption(ref)
1010
let _ = ref
1111

12-
Js.React.jsxsDom(
12+
JsxDOM.jsxs(
1313
"div",
1414
{
15-
children: Js.React.array([
16-
Js.React.jsxDom(
15+
children: Jsx.array([
16+
JsxDOM.jsx(
1717
"input",
1818
{
1919
type_: "text",
@@ -37,14 +37,9 @@ type props = {key?: string}
3737
let make = (_: props) => {
3838
let input = React.useRef(Js.Nullable.null)
3939

40-
Js.React.jsxDom(
40+
JsxDOM.jsx(
4141
"div",
42-
{
43-
children: Js.React.jsx(
44-
FancyInput.make,
45-
{ref: input, children: {React.string("Click to focus")}},
46-
),
47-
},
42+
{children: Jsx.jsx(FancyInput.make, {ref: input, children: {React.string("Click to focus")}})},
4843
)
4944
}
5045
let make = {

tests/ppx/react/expected/forwardRef.res_v4_cls.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module FancyInput = {
55
children: 'children,
66
ref?: ReactDOM.Ref.currentDomRef,
77
}
8-
let make = ({?className, children, ref, _}: props<'className, 'children>) => {
8+
let make = ({?className, children, ?ref, _}: props<'className, 'children>) => {
99
let ref = Js.Nullable.fromOption(ref)
1010
let _ = ref
1111

tests/ppx/react/expected/innerModule.res_v4_auto.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Bar = {
22
type props<'a, 'b> = {key?: string, a: 'a, b: 'b}
33
let make = ({a, b, _}: props<'a, 'b>) => {
44
Js.log("This function should be named `InnerModule.react$Bar`")
5-
Js.React.jsxDom("div", {key: ?None})
5+
JsxDOM.jsx("div", {key: ?None})
66
}
77
let make = {
88
let \"InnerModule$Bar" = (props: props<_>) => make(props)
@@ -12,7 +12,7 @@ module Bar = {
1212

1313
let component = ({a, b, _}: props<'a, 'b>) => {
1414
Js.log("This function should be named `InnerModule.react$Bar$component`")
15-
Js.React.jsxDom("div", {key: ?None})
15+
JsxDOM.jsx("div", {key: ?None})
1616
}
1717
let component = {
1818
let \"InnerModule$Bar$component" = (props: props<_>) => make(props)

tests/ppx/react/expected/newtype.res_v4_auto.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type props<'a, 'b, 'c> = {key?: string, a: 'a, b: 'b, c: 'c}
22
let make = (_: props<'a, 'b, 'c>, type a, ~a: a, ~b: array<option<[#Foo(a)]>>, ~c: 'a, _) =>
3-
Js.React.jsxDom("div", {key: ?None})
3+
JsxDOM.jsx("div", {key: ?None})
44
let make = {
55
let \"Newtype" = (props: props<_>) => make(props)
66
\"Newtype"

tests/ppx/react/expected/topLevel.res_v4_auto.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type props<'a, 'b> = {key?: string, a: 'a, b: 'b}
22
let make = ({a, b, _}: props<'a, 'b>) => {
33
Js.log("This function should be named 'TopLevel.react'")
4-
Js.React.jsxDom("div", {key: ?None})
4+
JsxDOM.jsx("div", {key: ?None})
55
}
66
let make = {
77
let \"TopLevel" = (props: props<_>) => make(props)

tests/ppx/react/expected/typeConstraint.res_v4_auto.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type props<'a, 'b> = {key?: string, a: 'a, b: 'b}
22
let make: 'a. (~a: 'a, ~b: 'a, 'a) => React.element = (_: props<'a, 'b>, type a): (
33
(~a: a, ~b: a, a) => React.element
4-
) => (~a, ~b, _) => Js.React.jsxDom("div", {key: ?None})
4+
) => (~a, ~b, _) => JsxDOM.jsx("div", {key: ?None})
55
let make = {
66
let \"TypeConstraint" = (props: props<_>) => make(props)
77
\"TypeConstraint"

0 commit comments

Comments
 (0)