Eslint issues + clean up

This commit is contained in:
frutescens 2024-08-25 15:41:54 -07:00
parent ec829f5eba
commit 06d5600ce4

View File

@ -1,10 +1,10 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import Phaser from "phaser"; import Phaser from "phaser";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import { Species } from "#enums/species"; import { Species } from "#enums/species";
import * as Utils from "#app/utils"; //import * as Utils from "#app/utils";
import { Moves } from "#enums/moves"; import { Moves } from "#enums/moves";
import BattleScene from "#app/battle-scene"; // import BattleScene from "#app/battle-scene";
import { LearnMovePhase } from "#app/phases/learn-move-phase"; import { LearnMovePhase } from "#app/phases/learn-move-phase";
import Overrides from "#app/overrides"; import Overrides from "#app/overrides";
//import { allMoves } from "#app/data/move"; //import { allMoves } from "#app/data/move";
@ -12,7 +12,6 @@ import Overrides from "#app/overrides";
describe("Learn Move Phase", () => { describe("Learn Move Phase", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
let game: GameManager; let game: GameManager;
let scene: BattleScene;
beforeAll(() => { beforeAll(() => {
phaserGame = new Phaser.Game({ phaserGame = new Phaser.Game({
@ -26,7 +25,6 @@ describe("Learn Move Phase", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
scene = game.scene;
Overrides.XP_MULTIPLIER_OVERRIDE = 50; Overrides.XP_MULTIPLIER_OVERRIDE = 50;
game.override.startingLevel(5); game.override.startingLevel(5);
}); });
@ -39,11 +37,10 @@ describe("Learn Move Phase", () => {
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
await game.doKillOpponents(); await game.doKillOpponents();
await game.phaseInterceptor.to(LearnMovePhase); await game.phaseInterceptor.to(LearnMovePhase);
const newMove = pokemon.getMoveset()[newMovePos];
const levelMove = pokemon.getLevelMoves(5)[0]; const levelMove = pokemon.getLevelMoves(5)[0];
const levelReq = levelMove[0]; const levelReq = levelMove[0];
const levelMoveId = levelMove[1]; const levelMoveId = levelMove[1];
expect(pokemon.level).toBeGreaterThanOrEqual(levelReq); expect(pokemon.level).toBeGreaterThanOrEqual(levelReq);
expect(newMove?.moveId).toBe(levelMoveId); expect(pokemon.getMoveset()[newMovePos]).toBe(levelMoveId);
}); });
}); });