diff --git a/test/React__test.re b/test/React__test.re
index 92e7ca67c..97373882f 100644
--- a/test/React__test.re
+++ b/test/React__test.re
@@ -447,28 +447,27 @@ describe("React", () => {
});
test("Can define components with custom children", () => {
- let container = getContainer(container);
- let root = ReactDOM.Client.createRoot(container);
-
module Test = {
type t = {name: string};
[@react.component]
let make = (~children) => {
- Array.map(children, c =>
-
{React.string(c.name)}
- )
- ->React.array;
+ React.array(
+ Belt.Array.map(children, c =>
+ {React.string(c.name)}
+ ),
+ );
};
};
- act(() => {
- ReactDOM.Client.render(
- root,
+ let container =
+ ReactTestingLibrary.render(
{Test.name: "foo"} {name: "bar"} ,
- )
- });
+ );
+
+ let foo = getByRole("foo", container);
+ expect(foo->innerHTML)->toBe("foo");
- expect(container->DOM.findBySelector("div[name='foo']")->Option.isSome)
- ->toBe(true);
+ let bar = getByRole("bar", container);
+ expect(bar->innerHTML)->toBe("bar");
});
});