mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-22 14:02:37 -05:00
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:
parent
c2c66a68d6
commit
05f8692300
3 changed files with 5783 additions and 6757 deletions
12529
package-lock.json
generated
12529
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -34,6 +34,12 @@
|
|||
"path": "cz-conventional-changelog"
|
||||
}
|
||||
},
|
||||
"tap": {
|
||||
"branches": 60,
|
||||
"functions": 70,
|
||||
"lines": 70,
|
||||
"statements": 70
|
||||
},
|
||||
"dependencies": {
|
||||
"@vernier/godirect": "1.5.0",
|
||||
"arraybuffer-loader": "^1.0.6",
|
||||
|
@ -90,7 +96,7 @@
|
|||
"scratch-svg-renderer": "0.2.0-prerelease.20210727023023",
|
||||
"script-loader": "0.7.2",
|
||||
"stats.js": "0.17.0",
|
||||
"tap": "12.0.1",
|
||||
"tap": "16.2.0",
|
||||
"tiny-worker": "2.3.0",
|
||||
"uglifyjs-webpack-plugin": "1.2.7",
|
||||
"webpack": "4.46.0",
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue