Skip to content

Commit

Permalink
Improve test from checking ref
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Nov 20, 2024
1 parent f3dc9f3 commit 0470e59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/Ref__test.re
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@ describe("ref", () => {
);
let button = getByRole("FancyButton", container);
expect(button->innerHTML)->toBe("Click me");
let content =
switch (Js.Nullable.toOption(domRef.current)) {
| Some(element) => element->innerHTML
| None => failwith("No element found")
};
expect(content)->toBe("Click me");
})
});

0 comments on commit 0470e59

Please sign in to comment.