js-waku/packages/tests/.mocharc.cjs
Danish Arora f3aed7074b
chore: switch out of allure reporters (#2222)
* chore: switch out of allure

* chore: fix config

* fix: test file patterns
2025-01-27 21:14:34 +05:30

27 lines
639 B
JavaScript

const config = {
extension: ['ts'],
require: ['ts-node/register', 'isomorphic-fetch'],
loader: 'ts-node/esm',
'node-option': [
'experimental-specifier-resolution=node',
'loader=ts-node/esm'
],
exit: true,
retries: 4
};
if (process.env.CI) {
console.log("Running tests in parallel");
config.parallel = true;
config.jobs = 6;
console.log("Using JSON reporter for test results");
config.reporter = 'json';
config.reporterOptions = {
output: 'reports/mocha-results.json'
};
} else {
console.log("Running tests serially. To enable parallel execution update mocha config");
}
module.exports = config;