Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix type errors in bitfield-rle tests #624

Merged
merged 5 commits into from
May 21, 2024
Merged

Conversation

EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented May 7, 2024

This fixes all the type errors in the tests for bitfield-rle. Some of the type errors were entirely test-only, but others required changes to the "real" code. Most notably, many Buffer types were changed to Uint8Array.

@EvanHahn EvanHahn requested a review from gmaclennan May 7, 2024 22:19
@EvanHahn EvanHahn marked this pull request as draft May 7, 2024 22:21
This fixes all the type errors in the tests for `bitfield-rle`. Some of
the type errors were entirely test-only, but others required changes to
the "real" code.

Most notably, many `Buffer` types were changed to `Uint8Array`, and some
unused code was removed.
@EvanHahn EvanHahn force-pushed the bitfield-rle-type-fixes branch from 4b16cd4 to c66fba7 Compare May 7, 2024 22:32
@EvanHahn EvanHahn marked this pull request as ready for review May 7, 2024 22:35
@EvanHahn EvanHahn requested review from achou11 and removed request for gmaclennan May 16, 2024 22:15
Copy link
Member

@gmaclennan gmaclennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel confident that this works correctly for typedarrays other than uint32Array. Do we need to make this change?

src/core-manager/bitfield-rle.js Outdated Show resolved Hide resolved
@EvanHahn
Copy link
Contributor Author

I redid this to limit source changes.

encodingLength was only used in tests and its tests had tricky type errors. I made encodingLength private and removed the tests.

@EvanHahn EvanHahn requested review from gmaclennan and removed request for achou11 May 20, 2024 16:45
@EvanHahn EvanHahn merged commit df66656 into main May 21, 2024
7 checks passed
@EvanHahn EvanHahn deleted the bitfield-rle-type-fixes branch May 21, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants