Skip to content

Commit

Permalink
test: add react.fragment with key
Browse files Browse the repository at this point in the history
  • Loading branch information
jchavarri authored and anmonteiro committed Jul 18, 2023
1 parent 065548c commit e784a95
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/React__test.re
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,27 @@ describe("React", () => {
expect(value.contents)->toEqual("My value");
});

test("React.Fragment with key", () => {
let container = getContainer(container);
let title = Some("foo");

act(() => {
ReactDOM.render(
<React.Fragment key=?title>
<div> "Child"->React.string </div>
</React.Fragment>,
container,
)
});

expect(
container
->DOM.findBySelectorAndPartialTextContent("div", "Child")
->Option.isSome,
)
->toBe(true);
});

/* test("ErrorBoundary", () => {
let container = getContainer(container);
Expand Down

0 comments on commit e784a95

Please sign in to comment.