From b16a28d5b8df5fe720e197cdd9a72824207da0a4 Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Thu, 25 Jul 2024 15:26:21 -0700 Subject: [PATCH] add OverridesHelper.startingLevel() --- 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 c9627f38c0b..bcb550945a6 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -41,6 +41,17 @@ export class OverridesHelper { return this; } + /** + * Override the player (pokemon) starting level + * @param level the (pokemon) level to set + * @returns this + */ + startingLevel(level: Species | number): this { + vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(level); + this.log(`Player Pokemon starting level set to ${level}!`); + return this; + } + /** * Override the player (pokemon) {@linkcode Species | species} * @param species the (pokemon) {@linkcode Species | species} to set