2023-10-23 17:53:56 +03:00
|
|
|
const config = {
|
|
|
|
extension: ['ts'],
|
|
|
|
spec: 'src/**/*.spec.ts',
|
|
|
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
|
|
|
loader: 'ts-node/esm',
|
|
|
|
'node-option': [
|
|
|
|
'experimental-specifier-resolution=node',
|
|
|
|
'loader=ts-node/esm'
|
|
|
|
],
|
2025-01-27 21:14:34 +05:30
|
|
|
exit: true,
|
|
|
|
retries: 4
|
2023-10-23 17:53:56 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
if (process.env.CI) {
|
|
|
|
console.log("Running tests in parallel");
|
|
|
|
config.parallel = true;
|
|
|
|
config.jobs = 6;
|
2025-02-03 10:29:55 +02:00
|
|
|
console.log("Activating allure reporting");
|
|
|
|
config.reporter = 'mocha-multi-reporters';
|
2023-10-23 17:53:56 +03:00
|
|
|
config.reporterOptions = {
|
2025-02-03 10:29:55 +02:00
|
|
|
configFile: '.mocha.reporters.json'
|
2023-10-23 17:53:56 +03:00
|
|
|
};
|
|
|
|
} else {
|
|
|
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
|
|
|
}
|
|
|
|
module.exports = config;
|