CODEBASE: Fix lint errors 4 (#1773)

Co-authored-by: Michael Ficocelli <ficocemt@gmail.com>
This commit is contained in:
catloversg
2024-11-14 22:47:35 +07:00
committed by GitHub
parent 4f84a894eb
commit 97ca8c5f5e
23 changed files with 123 additions and 99 deletions
+5 -5
View File
@@ -53,7 +53,7 @@ describe("Netscript Go API unit tests", () => {
throw new Error("Invalid");
});
await makePlayerMove(mockLogger, mockError, 0, 0).catch((_) => _);
await makePlayerMove(mockLogger, mockError, 0, 0).catch(() => {});
expect(mockError).toHaveBeenCalledWith("Invalid move: 0 0. That node is already occupied by a piece.");
});
@@ -95,7 +95,7 @@ describe("Netscript Go API unit tests", () => {
});
describe("getGameState() tests", () => {
it("should correctly retrieve the current game state", async () => {
it("should correctly retrieve the current game state", () => {
const board = ["OXX..", ".....", "..#..", "...XX", "...X."];
const boardState = boardStateFromSimpleBoard(board, GoOpponent.Daedalus, GoColor.black);
boardState.previousBoards = ["OX.........#.....XX...X."];
@@ -240,7 +240,7 @@ describe("Netscript Go API unit tests", () => {
});
});
describe("cheatPlayTwoMoves() tests", () => {
it("should handle invalid moves", async () => {
it("should handle invalid moves", () => {
const board = ["XOO..", ".....", ".....", ".....", "....."];
Go.currentGame = boardStateFromSimpleBoard(board, GoOpponent.Daedalus, GoColor.white);
const mockError = jest.fn();
@@ -289,7 +289,7 @@ describe("Netscript Go API unit tests", () => {
});
});
describe("cheatRemoveRouter() tests", () => {
it("should handle invalid moves", async () => {
it("should handle invalid moves", () => {
const board = ["XOO..", ".....", ".....", ".....", "....."];
Go.currentGame = boardStateFromSimpleBoard(board, GoOpponent.Daedalus, GoColor.white);
const mockError = jest.fn();
@@ -327,7 +327,7 @@ describe("Netscript Go API unit tests", () => {
});
});
describe("cheatRepairOfflineNode() tests", () => {
it("should handle invalid moves", async () => {
it("should handle invalid moves", () => {
const board = ["XOO..", ".....", ".....", ".....", "....#"];
Go.currentGame = boardStateFromSimpleBoard(board, GoOpponent.Daedalus, GoColor.white);
const mockError = jest.fn();