We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77a3d9c commit 1d786bcCopy full SHA for 1d786bc
1 file changed
src/components/__tests__/App.test.tsx
@@ -5,9 +5,11 @@ import { expect, it } from "vitest";
5
6
import App from "@/components/App";
7
8
-it("can browse to the count page", () => {
+it("can browse to the count page and increment counter", async () => {
9
const { getByText, findByText } = render(<App />);
10
expect(getByText("Welcome!")).toBeTruthy();
11
- userEvent.click(getByText("Go to count page"));
12
- expect(findByText("Count Page")).toBeTruthy();
+ await userEvent.click(getByText("Go to count page"));
+ expect(await findByText("Count Page")).toBeTruthy();
13
+ await userEvent.click(getByText("Increment"));
14
+ expect(await findByText("Current Count: 1")).toBeTruthy();
15
});
0 commit comments