feathers
feathers copied to clipboard
chore: vitest
migrate tests to vitest
- add vitest to all packages
- rm mocha & ts-node from all packages
- change scripts accordingly
- rename
before/aftermocha-hooks tobeforeAll&afterAll - migrate from callbacks (deprecated in vitest) to Promises
- do not use static ports, use pkg 'get-port' instead
I'd be open to this if the tests all pass, it run faster and supports a watch mode where it runs a package test suite on code changes.
Personally I was debating of moving everything to the new built-in Node test runner to reduce dependencies and - now that it is stable - also have to worry less about version upgrades (which was finicky sometimes even with Mocha which hasn't really changed much). But it's still clunky to use in some cases. For example, it doesn't support running TypeScript tests recursively (except with a programmatic hack).
I started using Vitest in another project and it is indeed working quite nicely and was the only test runner that worked with ES modules out of the box so this might also help us with the pains from #3375
Deploying feathers-dove with
Cloudflare Pages
| Latest commit: |
ca2608f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b9fc15e1.feathers.pages.dev |
| Branch Preview URL: | https://chore-vitest.feathers.pages.dev |
CI is broken for some reason. Only package that fails is '@feathersjs/knex' I think. But I don't know why. Please @daffl have a look.