scripts/templates/component.test.hbs
import { cleanup, render, screen } from "@testing-library/react";
import { afterEach, describe, test } from "vitest";
import { {{ pascalCase name }} } from "./{{ kebabCase name }}";
describe.concurrent("{{ kebabCase name }}", () => {
afterEach(cleanup);
test("Dummy test - test if renders without errors", ({ expect }) => {
const clx = "my-class";
render(<{{ pascalCase name }} className={clx} />);
expect(screen.getByTestId("{{ kebabCase name }}").classList).toContain(clx);
});
});