-
Notifications
You must be signed in to change notification settings - Fork 15
Closed as not planned
Description
I have a pretty basic test that I have not been able to get to pass, it has worked fine with RTL, but as I migrate, these are the main things that are failing.
import { describe, it, expect, vi } from "vitest";
import { render } from "vitest-browser-react";
import { page } from "@vitest/browser/context";
import { Button } from "../Button";
it.only("should fire the onPress/onClick handler", async () => {
const handler = vi.fn();
const screen = await page.render(<Button onClick={handler}>Button</Button>);
await screen.getByRole("button").click();
await expect(handler).toHaveBeenCalled();
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels