import { render, fireEvent, screen } from "@testing-library/react-native"; import React from "react"; import { Button } from "./"; import { IconType } from "../Icon"; // Mock the Icon component jest.mock("../Icon", () => ({ Icon: () => null, })); // Mock dependencies const mockIcon: IconType = "check" as unknown as IconType; const mockOnPress = jest.fn(); describe("Button", () => { const defaultProps = { label: "Test Button", onPress: mockOnPress, }; beforeEach(() => { jest.clearAllMocks(); }); it("Snapshot - default button", () => { const { toJSON } = render(