pokerogue/test
Bertie690 5efdb0dc0b
[Refactor] Fix issues with "last move selected" vs "used" (#5810)
* Added `MoveUseType` and refactored MEP

* Fixed Wimp out tests & ME code

finally i think all the booleans are gone
i hope

* Added version migration for last resort and co.

buh gumbug

* Fixed various bugs and added tests for previous bugfixes

* Reverted a couple doc changes

* WIP

* Update pokemon-species.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Update pokemon-phase.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Fixed remaining tests (I think)

* Reverted rollout test changes

* Fixed command phase bug causing metronome test timeout

* Revert early_bird.test.ts

* Fix biome.jsonc

* Made `MoveUseType` start at 1

As per @DayKev's request

* Fixed a thing

* Fixed bolt beak condition to be marginally less jank

* Applied some review suggestions

* Reverted move phase operations

* Added helper functions complete with markdown tables

* Fixed things

* Update battler-tags.ts

* Fixed random issues

* Fixed code

* Fixed comment

* Fixed import issues

* Fix disable.test.ts conflicts

* Update instruct.test.ts

* Update `biome.jsonc`

* Renamed `MoveUseType` to `MoveUseMode`; applied review comments

* Fixed space

* Fixed phasemanager bugs

* Fixed instruct test to not bork

* Fixed gorilla tactics bug

* Battler Tags doc fixes

* Fixed formatting and suttff

* Minor comment updates and remove unused imports in `move.ts`

* Re-add `public`, remove unnecessary default value in `battler-tags.ts`

* Restore `{}` in `turn-start-phase.ts`

Fixes `lint/correctness/noSwitchDeclarations`

* Remove extra space in TSDoc in `move-phase.ts`

* Use `game.field` instead of `game.scene` in `instruct.test.ts`

Also `game.toEndOfTurn()` instead of
`game.phaseInterceptor.to("BerryPhase")`

* Use `game.field` instead of `game.scene` in `metronome.test.ts`

* Use `toEndOfTurn()` instead of `to("BerryPhase")` in `powder.test.ts`

* Convert `MoveUseMode` enum to `const` object

* Update move-phase.ts

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* Add `enumValueToKey` utility function

* Apply Biome

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-06-15 10:52:44 -07:00
..
abilities [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
achievements [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
arena [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
battle [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
battlerTags [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
data [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
eggs [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
field [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
inputs [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
items [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
moves [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
mystery-encounter [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
phases [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
plugins/api [Bug] Fix clear ignoring errors from server (#5722) 2025-04-29 23:55:42 -07:00
settingMenu [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
sprites [Refactor] Refactor variant sprite code part 1 (#5592) 2025-04-09 10:43:05 -05:00
system [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
testUtils [Refactor] Fix issues with "last move selected" vs "used" (#5810) 2025-06-15 10:52:44 -07:00
ui [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
account.test.ts [Refactor] Remove circular imports part 1 (#5663) 2025-04-19 11:57:03 +00:00
battle-scene.test.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
boss-pokemon.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
daily_mode.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
endless_boss.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
enemy_command.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
escape-calculations.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
evolution.test.ts [Test] Convert game.override calls into chained line where possible 2025-06-15 00:40:41 -07:00
final_boss.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
fontFace.setup.ts [Test] Move test folder out of src (#5398) 2025-02-22 22:52:07 -06:00
game-mode.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
imports.test.ts [Refactor] Remove circular deps 3 (#5959) 2025-06-09 16:24:13 -07:00
internals.test.ts [Misc] Improve enum naming (#5933) 2025-06-04 14:54:27 -07:00
misc.test.ts [Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495) 2025-03-09 14:13:25 -07:00
reload.test.ts [Test] Remove unneeded mockRestore and testTimeout calls in tests 2025-06-15 00:48:16 -07:00
utils.test.ts [Refactor/Bug/Ability] Reworked BattleData, fixed Rage Fist, Harvest, Belch + Implemented Cud Chew (#5655) 2025-05-02 00:06:07 -05:00
vitest.setup.ts [Biome] Add "no unused imports" rule (#5580) 2025-03-29 10:24:23 +00:00