diff --git a/src/test/utils/overridesHelper.ts b/src/test/utils/overridesHelper.ts index d6bb0169540..00de71240b4 100644 --- a/src/test/utils/overridesHelper.ts +++ b/src/test/utils/overridesHelper.ts @@ -5,6 +5,7 @@ import { Moves } from "#app/enums/moves.js"; import { Species } from "#app/enums/species.js"; import * as GameMode from "#app/game-mode"; import { GameModes, getGameMode } from "#app/game-mode"; +import { ModifierOverride } from "#app/modifier/modifier-type.js"; import Overrides from "#app/overrides"; import GameManager from "#test/utils/gameManager"; import { vi } from "vitest"; @@ -52,6 +53,17 @@ export class OverridesHelper { return this; } + /** + * Override the player (pokemon) starting held items + * @param items the items to hold + * @returns this + */ + startingHeldItems(items: ModifierOverride[]) { + vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue(items); + this.log("Player Pokemon starting held items set to:", items); + return this; + } + /** * Override the player (pokemon) {@linkcode Species | species} * @param species the (pokemon) {@linkcode Species | species} to set