Skip to content

Commit

Permalink
Try testing differently
Browse files Browse the repository at this point in the history
  • Loading branch information
TrangPham committed Mar 11, 2024
1 parent ff524fa commit 096a40e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/controls/BooleanControl.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ test("handles onChange event correctly", async () => {
const checkbox = await screen.findByLabelText("Name");
expect(checkbox).not.toBeChecked();
// Called with the default when initialized
expect(updateData).toHaveBeenLastCalledWith({
data: { name: false },
errors: [],
});
expect(updateData).toHaveBeenLastCalledWith(undefined);

await userEvent.click(checkbox);
expect(checkbox).toBeChecked();
Expand Down

0 comments on commit 096a40e

Please sign in to comment.