chore: upgrade to Mocha v8 (#5997)

* chore: upgrade to Mocha v8

Mocha v8 has some nice improvements and also unlocks the potential
to have parallel test runs which may speed up CI.
This commit is contained in:
Jack Franklin
2020-06-18 16:26:30 +01:00
committed by GitHub
parent 9522f80116
commit 759b28080a
4 changed files with 55 additions and 38 deletions

View File

@@ -102,16 +102,17 @@ const trackCoverage = () => {
clearOldCoverage();
const coverageMap = new Map();
before(() => {
const api = require('../lib/api');
const events = require('../lib/common/Events');
for (const [className, classType] of Object.entries(api))
traceAPICoverage(coverageMap, events, className, classType);
});
after(() => {
writeCoverage(coverageMap);
});
return {
beforeAll: () => {
const api = require('../lib/api');
const events = require('../lib/common/Events');
for (const [className, classType] of Object.entries(api))
traceAPICoverage(coverageMap, events, className, classType);
},
afterAll: () => {
writeCoverage(coverageMap);
},
};
};
module.exports = {