Skip to content

Commit

Permalink
refactor jv-scheduler : add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
anthomba-tibco committed Dec 2, 2024
1 parent 493216a commit e8f6f2c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/jv-scheduler/test/components/loader/Loader.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom";
import Loader from "../../../src/components/loader/Loader";

jest.mock("@jaspersoft/jv-ui-components", () => ({
JVCircularProgress: jest.fn(() => <div data-testid="circular-progress" />),
}));

describe("Loader component", () => {
test("renders Loader component with two JVCircularProgress elements", () => {
render(<Loader />);
const progressElements = screen.getAllByTestId("circular-progress");
expect(progressElements).toHaveLength(2);
});
});

0 comments on commit e8f6f2c

Please sign in to comment.