mirror of
https://github.com/hanzoai/Detox.git
synced 2026-10-30 14:46:00 +00:00
17 lines
581 B
JavaScript
17 lines
581 B
JavaScript
/** @typedef {import('@jest/reporters').Reporter} Reporter */
|
|
|
|
const resolveFrom = require('resolve-from');
|
|
/** @type {new (globalConfig: any) => import('@jest/reporters').SummaryReporter} */
|
|
const SummaryReporter = require(resolveFrom(process.cwd(), '@jest/reporters')).SummaryReporter;
|
|
|
|
/** @implements {Partial<Reporter>} */
|
|
class DetoxSummaryReporter {
|
|
constructor(globalConfig) {
|
|
if (globalConfig.reporters.every(([name]) => name !== 'default' && name !== 'summary')) {
|
|
return new SummaryReporter(globalConfig);
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = DetoxSummaryReporter;
|