1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2025-01-24 11:46:19 +02:00
2021-03-11 00:14:27 +01:00

19 lines
590 B
TypeScript

import React from "react";
import { render } from "@testing-library/react";
import Index from "../src/pages/index";
import * as nextRouter from "next/router";
const useRouter = jest.spyOn(nextRouter, "useRouter");
describe("Index", () => {
it("should render successfully", () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
useRouter.mockImplementationOnce(() => ({ query: {} } as any));
const { baseElement } = render(
<Index totalItems={0} currentPage={0} totalPages={0} blueprints={[]} />
);
expect(baseElement).toBeTruthy();
});
});