-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use built in node:test
runner in all template test implementations
#682
feat: use built in node:test
runner in all template test implementations
#682
Conversation
* test: add a suite runner instead of using pattern directly in shell * ci: simplify * ci: flip logic * ci: correct the logic
* ci: only ts * ci: no c8 * ci: c8 for javascript * ci: no c8
imho this can be reviewed now by maintainers. |
node:test
runner in all template test implementations
Converted to draft. Waiting for #681 to be merged so this can be rebased on top of it. |
Good for review again @mcollina. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Shared workflow just needs to be updated to use v4, which dropped support for 14 and 16. This was discussed previously in this PR here: #682 (comment) |
I think we removd the v4 tag for now to avoid massive updates everywhere (by auto merge) that were not necessary. |
Any idea when this will get merged? I got a similar error to #680 when starting a project via |
Thank you @mcollina!! That worked. 😄 |
Closes #632 #680
For all 4 variants,
[cjs,esm] x [js, ts]
I've used a locally linked cli to generate a project and havenpm i && npm test
pass.Typescript variants have coverage enabled by default, cjs one using
c8
, esm one using--experimental-test-coverage
flag. tsx has been added to devDeps, in order to support ts-esm variant.Todos
There are two pending issues with this PR afaik:
test/templates/app-ts.test.ts
is skipped instead of letting it break the complete suite. See more here . Any help would be nice as to what to do with it.scriptunit:ts-cjs
is set to always pass due to||
. This is a chicken-egg problem. Here a template test suite is being run, but that test suite also requires afastify-cli/helper.js
by name. So, I can't really install that as devDependency of self. I'm sure there is some trick to handle this. Any help appreciated again.Skip running template suites on
14/16<20Node 20 on windows glob error
Checklist
npm run test
andnpm run benchmark
and the Code of conduct