fastify / fastify-cli

Run a Fastify application with one command!
MIT License
657 stars 163 forks source link

Use Node.js built-in test runner in templates #632

Closed piranna closed 9 months ago

piranna commented 1 year ago

Prerequisites

🚀 Feature Proposal

In same spirit to https://github.com/fastify/fastify-cli/issues/631, use the Node.js built-in test runner instead of tap, they are mostly compatibles and would remove an extra dependency.

Motivation

Use standard built-in modules and reduce dependencies.

Example

No response

piranna commented 1 year ago

I admit Node.js test runner is pretty new, just started on Node.js 18, so maybe it would be implemented behind a flag until all maintained versions have support for it (about two years from now) and later remove the flag and enable it by default.

piranna commented 12 months ago

Since now Node.js 18 is the oldest maintained version, can we implement this now? :-)

mcollina commented 12 months ago

Let's do it.

piranna commented 12 months ago

Great, I'll try to find some time to do a PR, I have just today created a new Fastify project and after upgrading dependencies, found that tap 18 has some compatibility issues when using ESM + Typescript, so the moment is perfect :-)