Skip to content

Comments

ci: transcribe cjs tests to ES Modules and TypeScript#4091

Merged
wellwelwel merged 3 commits intosidorares:masterfrom
wellwelwel:cjs-ts
Feb 18, 2026
Merged

ci: transcribe cjs tests to ES Modules and TypeScript#4091
wellwelwel merged 3 commits intosidorares:masterfrom
wellwelwel:cjs-ts

Conversation

@wellwelwel
Copy link
Collaborator

@wellwelwel wellwelwel commented Feb 17, 2026

Continues the work from #4086 by migrating all tests to ES Modules + TypeScript 🎉

Since this is so intensive, I'll break it down into stages. This PR will be exclusive for migrating the tests, not for refactoring them or deleting the .cjs files.

☔️ To be able to "navigate" through so many files and ensure there were no losses, I relied on coverage ratio.


As with #4086, no files outside tests were modified. Until the third stage, .cjs files will be kept (without any use) to assist in refactoring and to provide an accurate comparison to the original tests.

  • There are 157 missing types mapped that went unnoticed by ./test/tsc-build 😵‍💫
    • By searching for // @ts-expect-error: TODO: implement typings throughout the tests, fixes should be applied directly to the actual MySQL2 types.

Related


Off the record, I need to say that this really took a lot of work 🥲

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.95%. Comparing base (d830838) to head (a00f22b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4091   +/-   ##
=======================================
  Coverage   89.95%   89.95%           
=======================================
  Files          86       86           
  Lines       13663    13663           
  Branches     1637     1637           
=======================================
  Hits        12291    12291           
  Misses       1372     1372           
Flag Coverage Δ
compression-0 89.07% <ø> (ø)
compression-1 89.93% <ø> (ø)
static-parser-0 87.54% <ø> (ø)
static-parser-1 88.30% <ø> (ø)
tls-0 89.36% <ø> (ø)
tls-1 89.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wellwelwel wellwelwel marked this pull request as ready for review February 17, 2026 23:57
@wellwelwel
Copy link
Collaborator Author

wellwelwel commented Feb 17, 2026

In the third step, I'll remove all unused files (.cjs) and include a dedicated section for tests in the documentation (probably in Contributing.md).

@wellwelwel wellwelwel merged commit 7726d27 into sidorares:master Feb 18, 2026
100 checks passed
@wellwelwel wellwelwel deleted the cjs-ts branch February 18, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant