Node had introduced its built-in test runner `node:test`, as an
experimental feature in v18 but has since become a stable core feature in
v20.

All of our packages should already meet the minimum Node version
requirement to use the built-in test runner. Infact, there might be an
increased minimum Node version to v22 in the upcoming major releases of our
packages, but will require a separate discussion thread.

We have experimented with the new test runner in the following repositories
without encountering any issues:

- https://github.com/apache/cordova-eslint
- https://github.com/apache/cordova-node-xcode
- https://github.com/apache/cordova-browser

I will be opening a vote to finalize the migration of all our repositories
to the new built-in test runner and code coverage tooling.

Even if the vote passes, I don't expect the migration to happen all at once
across every repository. Most, if not all, of our repositories rely heavily
on `rewire`, which could make the migration challenging.

Moving away from `rewire` may require us to export methods that were
previously private. If we want to maintain some separation between public
and internal APIs, we may need to investigate splitting these methods into
separate files and using npm's `exports` field in `package.json` to control
which entry points are publicly accessible. *This would need confirmation
if it is a viable solution.*

Overall, this change would effectively remove the reliance on the following
third-party npm dependencies and shrinks our package-lock.json.
- Jasmine
- NYC/C8
- Rewire

Regards,
Bryan

Reply via email to