diff --git a/biome.jsonc b/biome.jsonc index 2433ba52010..186cd9f3a74 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -236,7 +236,7 @@ }, "overrides": [ { - "includes": ["**/test/**/*.test.ts"], + "includes": ["**/test/**/*.ts"], "linter": { "rules": { "performance": { @@ -245,8 +245,16 @@ }, "style": { "noNonNullAssertion": "off" // tedious in some tests - }, + } + } + } + }, + { + "includes": ["**/test/**/*.test.ts"], + "linter": { + "rules": { "nursery": { + // TODO: Enable for normal test folder files as well "noFloatingPromises": "error" } } diff --git a/src/queues/pokemon-priority-queue.ts b/src/queues/pokemon-priority-queue.ts index 597bfb32c0d..b4f1c852555 100644 --- a/src/queues/pokemon-priority-queue.ts +++ b/src/queues/pokemon-priority-queue.ts @@ -5,6 +5,6 @@ import { sortInSpeedOrder } from "#app/utils/speed-order"; /** A priority queue of {@linkcode Pokemon}s */ export class PokemonPriorityQueue extends PriorityQueue { protected override reorder(): void { - this.queue = sortInSpeedOrder(this.queue); + sortInSpeedOrder(this.queue); } } diff --git a/test/test-utils/game-manager.ts b/test/test-utils/game-manager.ts index ad2b1961073..55cb74e461c 100644 --- a/test/test-utils/game-manager.ts +++ b/test/test-utils/game-manager.ts @@ -539,16 +539,16 @@ export class GameManager { } /** - * Override the speed order of the battle's current combatants. - * Used to manually modify Pokemon turn order. - * @param order - The turn order to set as an array of {@linkcode BattlerIndex}es + * Override the turn order of the battle's current combatants. + * @param order - The turn order to set, as an array of {@linkcode BattlerIndex}es * @example * ```ts * game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2]); * ``` * @throws Fails test immediately if `order` does not contain all non-fainted combatants' `BattlerIndex`es. * @remarks - * This does not account for priority, the battlers' relative speed stats. + * This does not account for priority, nor does it change the battlers' speed stats + * (for the purposes of Electro Ball, etc). * @todo What should happen if the number of active battlers changes mid-test? */ public setTurnOrder(order: Exclude[]): void {