diff --git a/src/test/utils/overridesHelper.ts b/src/test/utils/overridesHelper.ts index 4fe605b4cac..5d9472deb70 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -1,5 +1,6 @@ import { Weather, WeatherType } from "#app/data/weather"; import { Biome } from "#app/enums/biome"; +import { Species } from "#app/enums/species.js"; import * as GameMode from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode"; import Overrides from "#app/overrides"; @@ -92,6 +93,17 @@ export class OverridesHelper { return this; } + /** + * Override the enemy (pokemon) species + * @param species the (pokemon) species to set + * @returns this + */ + enemySpecies(species: Species): this { + vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(species); + this.log(`Enemy Pokemon species set to ${Species[species]} (=${species})!`); + return this; + } + private log(...params: any[]) { console.log("Overrides:", ...params); }