Skip to content

Commit

Permalink
fix: missing dependencies resolved for failing react tests after movi…
Browse files Browse the repository at this point in the history
…ng to monorepo
  • Loading branch information
MarkLuxon committed Oct 27, 2024
1 parent 2806ee2 commit e131d1e
Show file tree
Hide file tree
Showing 9 changed files with 2,060 additions and 162 deletions.
1,058 changes: 903 additions & 155 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "turbo build",
"dev": "turbo run dev --parallel",
"lint": "turbo lint",
"test": "turbo test",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"commit": "cz"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/minotaur-chess-engine/test/helpers/moveEval.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ describe('FindBestMoveMiniMax', () => {
it('makes a legal move on opening for white', async () => {
const startingBoard = { ...StartingBoard };
const startingGameState = { ...InitialGameStatus };
const bestMove = await FindBestMoveMiniMax(startingBoard, startingGameState, 1);

const miniMaxResult = await FindBestMoveMiniMax(startingBoard, startingGameState, 1);
const bestMove = miniMaxResult[0];
expect(bestMove.to > 16 && bestMove.to <= 32).toBeTruthy;
expect(bestMove.from > 11 && bestMove.from < 14).toBeTruthy;
});
it('makes a legal first move for black', async () => {
const startingBoard = { ...StartingBoard };
const startingGameState = { ...InitialGameStatus };
startingGameState.isWhitesTurn = false;
const bestMove = await FindBestMoveMiniMax(startingBoard, startingGameState, 1);

const miniMaxResult = await FindBestMoveMiniMax(startingBoard, startingGameState, 1);
const bestMove = miniMaxResult[0];
expect(bestMove.to).toBeLessThanOrEqual(48);
expect(bestMove.to).toBeGreaterThanOrEqual(32);
expect(bestMove.from).toBeLessThanOrEqual(54);
Expand Down
Loading

0 comments on commit e131d1e

Please sign in to comment.