import { render } from "@testing-library/react-native"; import React from "react"; import LineGraph from "../../src/component/charts/line-graph/line-graph"; import { line_chart_two_y_data } from "../mock/charts/mock-data"; describe("LineGraph Component Tests", () => { it("renders correctly with data", () => { const { getByTestId } = render( , ); expect(getByTestId(`line-graph-1`)).toBeTruthy(); }); it("does not render without data", () => { // Have to ts-ignore to test null data conditions // @ts-ignore const { queryByTestId } = render(); expect(queryByTestId(`line-graph-2`)).toBeNull(); }); });