From a9031a3215e4d6bc25803fbad459a4fb3ad8bd8c Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Thu, 25 Jul 2024 16:04:46 -0700 Subject: [PATCH] add OverridesHelper.enemyLevel --- 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 ad19547b992..42600318a0f 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -188,6 +188,17 @@ export class OverridesHelper { return this; } + /** + * Override the enemy (pokemon) level + * @param level the level to set + * @returns this + */ + enemyLevel(level: number): this { + vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(level); + this.log(`Enemy Pokemon level set to ${level}!`); + return this; + } + private log(...params: any[]) { console.log("Overrides:", ...params); }