Update absolute-avarice-encounter.test.ts

This commit is contained in:
damocleas 2025-04-28 14:26:19 -04:00 committed by GitHub
parent 01cd4b02d3
commit c80ae26c7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,7 @@ import i18next from "i18next";
const namespace = "mysteryEncounters/absoluteAvarice"; const namespace = "mysteryEncounters/absoluteAvarice";
const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA]; const defaultParty = [Species.LAPRAS, Species.GENGAR, Species.ABRA];
const defaultBiome = Biome.PLAINS; const defaultBiome = Biome.TALL_GRASS;
const defaultWave = 45; const defaultWave = 45;
describe("Absolute Avarice - Mystery Encounter", () => { describe("Absolute Avarice - Mystery Encounter", () => {
@ -45,7 +45,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue( vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue(
new Map<Biome, MysteryEncounterType[]>([ new Map<Biome, MysteryEncounterType[]>([
[Biome.PLAINS, [MysteryEncounterType.ABSOLUTE_AVARICE]], [Biome.TALL_GRASS, [MysteryEncounterType.ABSOLUTE_AVARICE]],
[Biome.VOLCANO, [MysteryEncounterType.MYSTERIOUS_CHALLENGERS]], [Biome.VOLCANO, [MysteryEncounterType.MYSTERIOUS_CHALLENGERS]],
]), ]),
); );
@ -91,6 +91,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
game.override.startingHeldItems([ game.override.startingHeldItems([
{ name: "BERRY", count: 2, type: BerryType.SITRUS }, { name: "BERRY", count: 2, type: BerryType.SITRUS },
{ name: "BERRY", count: 3, type: BerryType.GANLON }, { name: "BERRY", count: 3, type: BerryType.GANLON },
{ name: "BERRY", count: 2, type: BerryType.APICOT },
]); ]);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
@ -102,6 +103,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
game.override.startingHeldItems([ game.override.startingHeldItems([
{ name: "BERRY", count: 2, type: BerryType.SITRUS }, { name: "BERRY", count: 2, type: BerryType.SITRUS },
{ name: "BERRY", count: 3, type: BerryType.GANLON }, { name: "BERRY", count: 3, type: BerryType.GANLON },
{ name: "BERRY", count: 2, type: BerryType.APICOT },
]); ]);
await game.runToMysteryEncounter(MysteryEncounterType.ABSOLUTE_AVARICE, defaultParty); await game.runToMysteryEncounter(MysteryEncounterType.ABSOLUTE_AVARICE, defaultParty);
@ -138,7 +140,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
expect(enemyField[0].species.speciesId).toBe(Species.GREEDENT); expect(enemyField[0].species.speciesId).toBe(Species.GREEDENT);
const moveset = enemyField[0].moveset.map(m => m.moveId); const moveset = enemyField[0].moveset.map(m => m.moveId);
expect(moveset?.length).toBe(4); expect(moveset?.length).toBe(4);
expect(moveset).toEqual([Moves.THRASH, Moves.BODY_PRESS, Moves.STUFF_CHEEKS, Moves.CRUNCH]); expect(moveset).toEqual([Moves.BODY_SLAM, Moves.CRUNCH, Moves.SLEEP_TALK, Moves.REST]);
const movePhases = phaseSpy.mock.calls.filter(p => p[0] instanceof MovePhase).map(p => p[0]); const movePhases = phaseSpy.mock.calls.filter(p => p[0] instanceof MovePhase).map(p => p[0]);
expect(movePhases.length).toBe(1); expect(movePhases.length).toBe(1);