From 1e4159d11d1c34013e191d4ab463bb99b0b3a169 Mon Sep 17 00:00:00 2001 From: numb86 <16703337+numb86@users.noreply.github.com> Date: Tue, 7 Jan 2020 09:15:33 +0900 Subject: [PATCH] Fix sample test code (#2648) --- content/docs/testing-recipes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) {