Repository navigation
Port the unit tests and their harness to strict TypeScript (TS16) - #27
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Finesssee
force-pushed
the
ts/ts16-unit-tests
branch
from
October 11, 2026 19:21
da2480e to
7ab2bf2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports the unit tests and their harness to strict TypeScript (TS16 in the port plan). Viewers, streamers and the overlay see no change: the build output is byte-identical to main (
port-check: 155 build output files compared, 0 different; the served hash stays15ab3b21f0).tests/*.test.mjs,tests/register.mjs,tests/cloudflare-test-loader.mjs,tests/csp-helper.mjsandtests/upload-helpers.mjsbecome.ts.test:unitrunstests/*.test.ts.tests/fakes.tsholds one SQLite Durable Object fake (fakeCtx()onnode:sqlite) in place of the copies in channel, dev-api, dedupe and upload-helpers, plusasEnv(),asExecutionContext(),must()andLoose.tsconfig.strict-tests.jsonholds tests that import DOM modules only.tsconfig.strict-tests-shared.jsonholds tests that import both Worker and DOM modules.port-check --strict-listaccepts all four lists.tests/atlas.test.ts(split from upload) andtests/cosmetics.test.ts(split from channel) are new files. Test names and count are unchanged.SendResultmoved fromserver/eventsub.tstoserver/model.ts. Otherwiseserver/parse.tspulled eventsub's Web Crypto code into the shared test program, where it doesn't type-check under Node's typed-array types. This is type-only.src/served/overlay.ts:let lookTimer: unknown = 0. This is type-only (bothReturnTypeforms failed oxlint's type-aware rules).Checks
bun run check: 343 of 343 pass. The test names match main's, exceptcosmetic ids: … (src/served/cosmetics.js)now reads.ts.bun run test:port: 100 of 100. A new fixture covers a file listed only intsconfig.strict-tests.json.parseGameCommandreturn null fails 70 of 326 tests.botCommandanswer 204 first fails 17 of 326 tests.as(as unknown ascounts as two), 0!, and oneany(theLoosealias). Each has a reason on its line or the line above.Left for later
seReplyTextrequiresorigin.shownProfilerejectsnull.ProfileInput.statsrequires fullStats.tierBoostrequires its second argument.Duelhas nopaidfield.reviewReasonsrequires a fullHelixUser.public/_headers:2.src/served/cosmetics.ts:2, which has to stay byte-identical. It goes to TS21.