diff --git a/content/docs/testing-recipes.md b/content/docs/testing-recipes.md index f666116e..6c860f13 100644 --- a/content/docs/testing-recipes.md +++ b/content/docs/testing-recipes.md @@ -396,14 +396,14 @@ it("changes value when clicked", () => { // get ahold of the button element, and trigger some clicks on it const button = document.querySelector("[data-testid=toggle]"); - expect(button.innerHTML).toBe("Turn off"); + expect(button.innerHTML).toBe("Turn on"); act(() => { button.dispatchEvent(new MouseEvent("click", { bubbles: true })); }); expect(onChange).toHaveBeenCalledTimes(1); - expect(button.innerHTML).toBe("Turn on"); + expect(button.innerHTML).toBe("Turn off"); act(() => { for (let i = 0; i < 5; i++) {