Open zanerock opened 3 days ago
Hi.. it's unlikely this project's test suite will migrate to Jest for several reasons but I agree it could do with a general refresh - will look into it.
I might be able to take a crack at it if you have a set of constraints. I would have spent more time getting the existing system working, but it just seemed like the test-runner project had run out of steam.
I love the fact you're willing to put the work in but yes, just give me some time to refresh the library first so you're not working against outdated code. Yes, there are constraints mainly revolving around stability (this is a Top 1% most-depended-on npm library that has been stable for a decade). Another constraint is minimalism - supporting just the baseline, core requirements whilst enabling extension and personalisation. I'll get back to you.
test-runner -> jest and fix coverage
The test-runner project does not seem to be under active development and command-line-rep is currently using an even older version (0.5) that the 2 year old version (0.10). Also, despite trying for an hour, I couldn't get the
nyc
coverage generation tool to work with test-runner.import TestRunner from 'test-runner'
andconst runner = new TestRunner()
. Then changerunner.test
totest
and everything is ready to go.jest.config.mjs
.test:js
,test:mjs
, andcover
to use jest.As a bonus, the true coverage is revealed at 94%!
Update Node support.
There's an outstanding PR that shows node 4 and 6 breaking with 8 unknown. The actual report isn't available, but these are really old versions and support can probably be dropped.
package.json
engines
specification to match the CI testing. From"node": ">=4.0
to"node": "^10 || ^12 || ^14.15.x || ^16.10.x || ^17 || ^18 || ^20 || ^22"
. There may be more to Node support strategy.