test: use node test runner to assert expected cases#538
Conversation
|
🔬 Hmm... I'm not sure coverage reports are generated as noted in codecov/feedback#107 for Node 20? Perhaps this is saved as a draft PR for now, or coverage is checked otherwise in the meantime. Open to suggestions! |
| "lint:fix": "biome check --write", | ||
| "lint": "biome check", | ||
| "test": "c8 mocha test/*.spec.js", | ||
| "test": "node --test --experimental-test-coverage test/*.spec.js", |
There was a problem hiding this comment.
This is awesome 💯 it would allow us to reduce our dependencies
My only concern here is that --experimental-test-coverage is still experimental and subject to breaking changes and potential removal, I haven't been able to find a stable target release date for it.
I'm not opposed to testing this out on this project but we need to be ready to potentially roll this back if the feature changes or gets removed
There was a problem hiding this comment.
@WilliamBergamin I share this concern but think adjusting with those changes might be nice to prefer fewer packages installed 🎁
A commit 41a3be0 was added for generating coverage reports for the @codecov steps which might help avoid regression in PRs too! IIRC this'll be running after a merge to main but I'll report back 👾
There was a problem hiding this comment.
👁️🗨️ Hmm a fast follow was needed to upload the coverage report instead of test reports! #539
|
@WilliamBergamin I share the excitement - these are nice defaults to use! Thanks so much for the review too 🚢 ✨ |
Summary
This PR uses the
node:testpackage to assert expected cases in place of the amazingmochaandchaipackages ☕ 🫡Notes
Also removed are the kind packages adjacent: 💌
@types/chai@types/mochac8mocha-suppress-logsCoverage is changed from
c8to--experimental-test-coveragewhich is checking both "src" and "test" directories but updates for #487 might bring options to change this also 🧪Requirements