Fix TypeScript errors in test files

- Add missing 'src' property to OpeningMetadata test fixtures

- Add missing 'id' and 'description' properties to Personality test fixtures

- Add missing 'isPlayerWhite' property to EvaluationBar test cases

All tests now pass TypeScript validation. No changes to production code.
This commit is contained in:
Stefan
2026-01-04 10:19:57 +01:00
parent f8cf03c888
commit 7f1c20f553
7 changed files with 19 additions and 7 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import "@testing-library/jest-dom";
describe("EvaluationBar", () => {
it("renders 0.0 for initial state", () => {
render(<EvaluationBar score={0} />);
render(<EvaluationBar score={0} isPlayerWhite={true} />);
expect(screen.getByText("0.0")).toBeInTheDocument();
});
@@ -19,12 +19,12 @@ describe("EvaluationBar", () => {
});
it("renders mate score", () => {
render(<EvaluationBar mate={3} />);
render(<EvaluationBar mate={3} isPlayerWhite={true} />);
expect(screen.getByText("M3")).toBeInTheDocument();
});
it("renders negative mate score", () => {
render(<EvaluationBar mate={-5} />);
render(<EvaluationBar mate={-5} isPlayerWhite={true} />);
expect(screen.getByText("M5")).toBeInTheDocument();
});
});