Skip to content

Commit

Permalink
test: added new test case for toggle switch
Browse files Browse the repository at this point in the history
  • Loading branch information
yaswanth-deriv committed Mar 26, 2024
1 parent 76dc372 commit 72a87ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ToggleSwitch/__test__/ToggleSwitch.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe("ToggleSwitch Component", () => {
it("checks if value has been set to false before firing event and true after firing event", () => {
let isChecked =false;
const onChange = jest.fn(() => {
isChecked = !isChecked; // Toggle isChecked when onChange is called
isChecked = !isChecked;
console.log(isChecked,"value")
});
const { getByRole,rerender } = render(
Expand Down

0 comments on commit 72a87ed

Please sign in to comment.