Files
chess/server/src/__test__/isSquareAttacked.test.ts
T
2023-05-01 01:41:33 +03:00

13 lines
357 B
TypeScript

import { expect, test } from "vitest";
import Chess from "../chess/engine";
test("", () => {
const chess = Chess.load();
expect(chess.isSquareAttacked("e4", "w")).toBe(true);
expect(chess.isSquareAttacked("e4", "b")).toBe(false);
expect(chess.isSquareAttacked("e5", "w")).toBe(false);
expect(chess.isSquareAttacked("e5", "b")).toBe(false);
});