pokerogue/test/test-utils/matchers
Sirz Benjie e5e0835a96
[Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547)
* make IVs use Uint8Array

* Add many typed array helpers

* Move array utils to its own file

* Add suppression comment

* Adjust type of `getStats`

* Adjust test mocks to use typed arrays

* Adjust signatures of some phases to use ArrayLike<T>

* Adjust signature of src/ui/containers/stats-container#updateIvs

* Remove comment gap to try to satisfy typedoc

* Ensure ivs are always set

* fix: fun-and-games me to use typed array

* Add new tests for array utilities

* Update type of ivs in save-data.ts

* Update part-timer-encounter.test.ts

* Convert uses of StatusEffect[] to Uint8Array

* Update ssui to use uint8array for ivs

* Revert use of typed arrays

* Move `nil` to @types/common

* Make more arrays readonly

* fix: remnant change to immune effects

* Even more array improvements

* Apply kev's suggestions from code review

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

* address Bertie's comments from code review

* tests: remove undefined check for bigint array types

* fixup abilities.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-10-06 12:21:58 -05:00
..
to-be-at-phase.ts [Refactor] Remove null from PhaseManager.currentPhase signature 2025-09-05 09:28:35 -07:00
to-equal-unsorted.ts [Test] Added Map key matcher; enforced strong typing on matchers (#6561) 2025-09-20 17:24:27 -05:00
to-have-ability-applied.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-arena-tag.ts [Test] Improved typing on BattlerTagData and ArenaTagData; improved test matchers (#6338) 2025-09-05 21:50:37 -05:00
to-have-battler-tag.ts [Dev] Improve typescript performance and version bump node and dependencies (#6627) 2025-10-04 19:29:23 -05:00
to-have-effective-stat.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-fainted.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-full-hp.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-hp.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-key.ts [Test] Added Map key matcher; enforced strong typing on matchers (#6561) 2025-09-20 17:24:27 -05:00
to-have-positional-tag.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-shown-message.ts [Test] Added matcher to check message contents; added tests for Splash, Celebrate, Laser Focus (#6299) 2025-09-10 13:40:21 -05:00
to-have-stat-stage.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-status-effect.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-taken-damage.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-terrain.ts [Test] Added Map key matcher; enforced strong typing on matchers (#6561) 2025-09-20 17:24:27 -05:00
to-have-types.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-used-move.ts [Test] Added toHaveArenaTagMatcher + fixed prior matchers (#6205) 2025-08-14 13:16:23 -07:00
to-have-used-pp.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
to-have-weather.ts [Test] Added Map key matcher; enforced strong typing on matchers (#6561) 2025-09-20 17:24:27 -05:00