Delete a skipped test, and skip a nonfunctional one
The test I added a skip statement to is just there as a second possible method of making these last tests
This commit is contained in:
parent
752bd4f017
commit
4a27252231
|
@ -2,9 +2,6 @@ import { GameMode, GameModes, getGameMode } from "#app/game-mode";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import GameManager from "./utils/gameManager";
|
import GameManager from "./utils/gameManager";
|
||||||
import { getPartyLuckValue } from "#app/modifier/modifier-type";
|
|
||||||
import { Species } from "#app/enums/species";
|
|
||||||
import { getPokemonSpecies } from "#app/data/pokemon-species";
|
|
||||||
|
|
||||||
describe("game-mode", () => {
|
describe("game-mode", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
|
@ -46,42 +43,4 @@ describe("game-mode", () => {
|
||||||
expect(classicGameMode.isWaveTrainer(19, arena)).toBeFalsy();
|
expect(classicGameMode.isWaveTrainer(19, arena)).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe.skip("Luck Check", async () => {
|
|
||||||
beforeAll(() => {
|
|
||||||
phaserGame = new Phaser.Game({
|
|
||||||
type: Phaser.HEADLESS,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
game.phaseInterceptor.restoreOg();
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
game = new GameManager(phaserGame);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("applies luck in Classic", () => {
|
|
||||||
game.override
|
|
||||||
.shinyLevel(true, 2);
|
|
||||||
game.classicMode.startBattle([Species.PICHU]);
|
|
||||||
game.scene.addPlayerPokemon(getPokemonSpecies(Species.PICHU), 5, undefined, undefined, undefined, true, 2);
|
|
||||||
const party = game.scene.getParty();
|
|
||||||
const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() : 0)
|
|
||||||
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
|
||||||
expect(luck).toBeGreaterThan(0);
|
|
||||||
expect(getPartyLuckValue(party)).toBeGreaterThan(0);
|
|
||||||
});
|
|
||||||
it("does not apply luck in Daily Runs", () => {
|
|
||||||
game.override
|
|
||||||
.shinyLevel(true, 2);
|
|
||||||
game.dailyMode.startBattle();
|
|
||||||
game.scene.addPlayerPokemon(getPokemonSpecies(Species.PICHU), 5, undefined, undefined, undefined, true, 2);
|
|
||||||
const party = game.scene.getParty();
|
|
||||||
const luck = Phaser.Math.Clamp(party.map(p => p.isAllowedInBattle() ? p.getLuck() : 0)
|
|
||||||
.reduce((total: integer, value: integer) => total += value, 0), 0, 14);
|
|
||||||
expect(luck).toBeGreaterThan(0);
|
|
||||||
expect(getPartyLuckValue(party)).toBe(0);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -96,7 +96,7 @@ describe("UI - Transfer Items", () => {
|
||||||
}, 20000);
|
}, 20000);
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Test", () => {
|
describe.skip("Backup Test", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue