diff --git a/src/test/utils/overridesHelper.ts b/src/test/utils/overridesHelper.ts index bcb550945a6..a888e257c44 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -63,6 +63,17 @@ export class OverridesHelper { return this; } + /** + * Override the player (pokemon) {@linkcode Abilities | ability} + * @param ability the (pokemon) {@linkcode Abilities | ability} to set + * @returns this + */ + ability(ability: Abilities): this { + vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability); + this.log(`Player Pokemon ability set to ${Abilities[ability]} (=${ability})!`); + return this; + } + /** * Override each wave to have or not have standard trainer battles * @returns this