🧪 Add Vitest testing framework with basic composition test

Set up testing infrastructure using Vitest and React Testing Library.
Add test verifying empty MyComposition renders without errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
HolgerHatGarKeineNode
2026-01-24 12:48:10 +01:00
parent 4022fbde83
commit b7740a9750
6 changed files with 2680 additions and 4 deletions

View File

@@ -0,0 +1,15 @@
import { describe, it, expect } from "vitest";
import { render } from "@testing-library/react";
import { MyComposition } from "./Composition";
describe("MyComposition", () => {
it("renders without errors", () => {
const { container } = render(<MyComposition />);
expect(container).toBeInTheDocument();
});
it("returns null (empty composition)", () => {
const { container } = render(<MyComposition />);
expect(container.firstChild).toBeNull();
});
});

1
videos/src/test/setup.ts Normal file
View File

@@ -0,0 +1 @@
import "@testing-library/jest-dom/vitest";