Update test

This commit is contained in:
NightKev 2025-08-18 18:48:32 -07:00
parent d51daabb4f
commit 580702c9c8

View File

@ -2,7 +2,6 @@ import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import { Stat } from "#enums/stat";
import { QuietFormChangePhase } from "#phases/quiet-form-change-phase";
import { GameManager } from "#test/test-utils/game-manager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
@ -27,7 +26,7 @@ describe("Ability - Embody Aspect", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.moveset([MoveId.SPLASH])
.moveset(MoveId.SPLASH)
.ability(AbilityId.EMBODY_ASPECT_TEAL)
.battleStyle("single")
.criticalHits(false)
@ -38,16 +37,17 @@ describe("Ability - Embody Aspect", () => {
it("Embody Aspect should activate on switching in if user is terrestrialized", async () => {
await game.classicMode.startBattle([SpeciesId.OGERPON, SpeciesId.ABOMASNOW]);
const Ogerpon = game.scene.getPlayerParty()[0];
expect(Ogerpon.formIndex).toBe(baseForm);
const ogerpon = game.field.getPlayerPokemon();
expect(ogerpon.formIndex).toBe(baseForm);
expect(ogerpon.getStatStage(Stat.SPD)).toBe(0);
//Also terastallizes Ogerpon
game.move.selectWithTera(MoveId.SPLASH);
await game.phaseInterceptor.to(QuietFormChangePhase);
expect(Ogerpon.formIndex).toBe(teraForm);
await game.phaseInterceptor.to("QuietFormChangePhase");
expect(ogerpon.formIndex).toBe(teraForm);
await game.toNextTurn();
expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
expect(ogerpon.getStatStage(Stat.SPD)).toBe(1);
//Switch Ogerpon out
game.doSwitchPokemon(1);
@ -58,6 +58,6 @@ describe("Ability - Embody Aspect", () => {
await game.toNextTurn();
//Ability activated
expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
expect(ogerpon.getStatStage(Stat.SPD)).toBe(1);
});
});