pokerogue/test/test-utils
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
..
helpers [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
matchers [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
mocks [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
reporters [Test] Revamped MockConsoleLog with color support (#6218) 2025-09-07 09:18:47 -05:00
saves [Test][UI/UX] Add save file with full, sanitized unlocks (#6514) 2025-09-23 08:36:10 -05:00
setup [Docs] Add blank space to prevent incorrect comment attachment 2025-09-14 20:45:01 -07:00
error-interceptor.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
fakeMobile.html [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
game-manager-utils.ts [Refactor] Refactor Starter and its handling (#6477) 2025-09-21 11:07:08 -07:00
game-manager.ts [Misc][UI/UX] See stats of other users in admin panel (#6579) 2025-09-27 14:44:29 -07:00
game-wrapper.ts [Refactor][Dev] Move public to its own submodule (#6590) 2025-09-27 11:01:12 -05:00
inputs-handler.ts [UI/UX] Use pointer events instead of touch events in TouchControl (#6506) 2025-09-07 17:35:49 -05:00
listeners-manager.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
phase-interceptor.ts [Docs] [Bug] Fix types for PhaseInterceptor 2025-09-11 08:33:45 -05:00
string-utils.ts [Test] Improved typing on BattlerTagData and ArenaTagData; improved test matchers (#6338) 2025-09-05 21:50:37 -05:00
test-file-initialization.ts [Test] Revamped MockConsoleLog with color support (#6218) 2025-09-07 09:18:47 -05:00
test-utils.ts [Docs] Fixup typedoc warnings (#6540) 2025-09-10 13:35:55 -05:00
text-interceptor.ts [Test] Revamped MockConsoleLog with color support (#6218) 2025-09-07 09:18:47 -05:00