From 0b5b481de63bbca03e1c6c45237d1d2decbd87f6 Mon Sep 17 00:00:00 2001 From: schmidtc1 <62030095+schmidtc1@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:49:52 -0400 Subject: [PATCH] [Test] Prevent flying types/levitate from breaking Ceaseless Edge test (#2931) * Modifies ceaseless edge test to account for flying types/levitate ability * Removes .js from imports --- src/test/moves/ceaseless_edge.test.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test/moves/ceaseless_edge.test.ts b/src/test/moves/ceaseless_edge.test.ts index de47027ccd5..6443e34d8d2 100644 --- a/src/test/moves/ceaseless_edge.test.ts +++ b/src/test/moves/ceaseless_edge.test.ts @@ -9,9 +9,10 @@ import { import {getMovePosition} from "#app/test/utils/gameManagerUtils"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; -import { ArenaTagType } from "#app/enums/arena-tag-type.js"; -import { allMoves } from "#app/data/move.js"; -import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag.js"; +import { ArenaTagType } from "#app/enums/arena-tag-type"; +import { allMoves } from "#app/data/move"; +import { ArenaTagSide, ArenaTrapTag } from "#app/data/arena-tag"; +import { Abilities } from "#app/enums/abilities"; const TIMEOUT = 20 * 1000; @@ -33,6 +34,8 @@ describe("Moves - Ceaseless Edge", () => { game = new GameManager(phaserGame); vi.spyOn(overrides, "SINGLE_BATTLE_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(Species.RATTATA); + vi.spyOn(overrides, "OPP_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY); + vi.spyOn(overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY); vi.spyOn(overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100); vi.spyOn(overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]); @@ -103,9 +106,8 @@ describe("Moves - Ceaseless Edge", () => { async () => { vi.spyOn(overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{name: "MULTI_LENS"}]); vi.spyOn(overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(5); - vi.spyOn(overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(0); - await game.startBattle([ Species.SNORLAX, Species.MUNCHLAX ]); + await game.startBattle([ Species.ILLUMISE ]); const leadPokemon = game.scene.getPlayerPokemon(); expect(leadPokemon).toBeDefined();