test: upgrade tap, configure coverage thresholds

As part of simplifying the CI setup I plan to not explicitly specify
`--jobs=4` to `tap` going forward. Upgrading to a newer version of `tap`
means that it will automatically parallelize jobs according to available
CPU count, which should be better anyway. Only one of our tests was
incompatible with newer versions of `tap`, so this commit includes a
compatibility fix there.

Also, by default newer versions of `tap` calculate coverage and consider
the test run to fail if below the configured thresholds. The default is
100% coverage and we're not there, so I adjusted the thresholds to match
where we're at for now. We can ratchet those up over time.
This commit is contained in:
Christopher Willis-Ford 2022-06-02 13:01:00 -07:00
parent c2c66a68d6
commit 05f8692300
3 changed files with 5783 additions and 6757 deletions

View file

@ -6,12 +6,11 @@ const test = tap.test;
let originals;
let newBlocks;
tap.beforeEach(done => {
tap.beforeEach(() => {
originals = simpleStack;
// Will be mutated so make a copy first
newBlocks = JSON.parse(JSON.stringify(simpleStack));
newBlockIds(newBlocks);
done();
});