mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-10 09:29:25 +02:00
Fixed the tests
This commit is contained in:
parent
7f2766f832
commit
903d1a33dd
@ -38,7 +38,7 @@ describe.each<{ name: string; ability: AbilityId; status: StatusEffect }>([
|
|||||||
game.override
|
game.override
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.criticalHits(false)
|
.criticalHits(false)
|
||||||
.startingLevel(100)
|
.enemyLevel(100)
|
||||||
.enemySpecies(SpeciesId.MAGIKARP)
|
.enemySpecies(SpeciesId.MAGIKARP)
|
||||||
.enemyAbility(ability)
|
.enemyAbility(ability)
|
||||||
.enemyMoveset(MoveId.SPLASH);
|
.enemyMoveset(MoveId.SPLASH);
|
||||||
@ -71,7 +71,8 @@ describe.each<{ name: string; ability: AbilityId; status: StatusEffect }>([
|
|||||||
feebas.doSetStatus(status);
|
feebas.doSetStatus(status);
|
||||||
expect(feebas.status?.effect).toBe(status);
|
expect(feebas.status?.effect).toBe(status);
|
||||||
|
|
||||||
game.move.use(MoveId.SKILL_SWAP);
|
game.move.use(MoveId.SPLASH);
|
||||||
|
await game.move.forceEnemyMove(MoveId.SKILL_SWAP); // need to force enemy to use it as
|
||||||
await game.toEndOfTurn();
|
await game.toEndOfTurn();
|
||||||
|
|
||||||
expect(feebas.status?.effect).toBeUndefined();
|
expect(feebas.status?.effect).toBeUndefined();
|
||||||
|
@ -7,6 +7,7 @@ import { SpeciesId } from "#enums/species-id";
|
|||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
import { MoveUseMode } from "#enums/move-use-mode";
|
||||||
|
|
||||||
describe("Moves - Sleep Talk", () => {
|
describe("Moves - Sleep Talk", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
@ -49,12 +50,12 @@ describe("Moves - Sleep Talk", () => {
|
|||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
move: MoveId.SWORDS_DANCE,
|
move: MoveId.SWORDS_DANCE,
|
||||||
result: MoveResult.SUCCESS,
|
result: MoveResult.SUCCESS,
|
||||||
virtual: true,
|
useMode: MoveUseMode.FOLLOW_UP,
|
||||||
}),
|
}),
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
move: MoveId.SLEEP_TALK,
|
move: MoveId.SLEEP_TALK,
|
||||||
result: MoveResult.SUCCESS,
|
result: MoveResult.SUCCESS,
|
||||||
virtual: false,
|
useMode: MoveUseMode.NORMAL,
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user