From b72a1347b28ef6520b7372959dbdc576afc2ba26 Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Thu, 25 Jul 2024 16:30:28 -0700 Subject: [PATCH] add OverridesHelper.passiveAbility --- src/test/utils/overridesHelper.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/utils/overridesHelper.ts b/src/test/utils/overridesHelper.ts index 8f4e0f54834..d6bb0169540 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -88,6 +88,17 @@ export class OverridesHelper { return this; } + /** + * Override the player (pokemon) **passive** {@linkcode Abilities | ability} + * @param passiveAbility the (pokemon) **passive** {@linkcode Abilities | ability} to set + * @returns this + */ + passiveAbility(passiveAbility: Abilities): this { + vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(passiveAbility); + this.log(`Player Pokemon PASSIVE ability set to ${Abilities[passiveAbility]} (=${passiveAbility})!`); + return this; + } + /** * Override the player (pokemon) {@linkcode Moves | moves}set * @param moveset the {@linkcode Moves | moves}set to set