From f9d74aa83613b003853723953b42f969ffaf6325 Mon Sep 17 00:00:00 2001 From: Zach Day Date: Thu, 20 Jun 2024 14:02:05 -0400 Subject: [PATCH] [Fix] Fix randomness in Gastro Acid unit test (#2443) * Make ability suppression fail if ability is already suppressed * Document SuppressAbilitiesAttr * Add gastro acid unit tests * Fix rng broken unit test * Fix it for both tests --- src/test/moves/gastro_acid.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/moves/gastro_acid.test.ts b/src/test/moves/gastro_acid.test.ts index e38dd5f44f4..063a17aead9 100644 --- a/src/test/moves/gastro_acid.test.ts +++ b/src/test/moves/gastro_acid.test.ts @@ -9,6 +9,7 @@ import { BattlerIndex } from "#app/battle.js"; import { getMovePosition } from "../utils/gameManagerUtils"; import { MoveResult } from "#app/field/pokemon.js"; import { Stat } from "#app/data/pokemon-stat.js"; +import { Species } from "#app/enums/species.js"; const TIMEOUT = 20 * 1000; @@ -33,6 +34,7 @@ describe("Moves - Gastro Acid", () => { vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE); vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]); + vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.BIDOOF); vi.spyOn(overrides, "OPP_MOVESET_OVERRIDE", "get").mockReturnValue([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]); vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.WATER_ABSORB); });