react18-tools/turborepo-template

View on GitHub
lib/src/server/common/base/base.test.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import { cleanup, render } from "@testing-library/react";
import { afterEach, describe, test } from "vitest";
import { Base } from "./base";

describe.concurrent("base", () => {
  afterEach(cleanup);

  test("check if h1 heading exists", ({ expect }) => {
    const { container } = render(<Base loaderClass="my-clx" />);
    expect(container.children[0].classList).toContain("my-clx");
  });
});