Skip to content

Commit ead1ab4

Browse files
committed
chore: bump version to 1.1.7 and enhance extra reporters handling
- Updated version from 1.1.6 to 1.1.7 in package.json. - Improved the handling of extra reporter options to ensure compatibility with different reporter configurations. - Streamlined the removal of main reporter specific options and added support for various reporter option properties. These changes enhance the flexibility and usability of the mocha-qase-reporter. Fixed #858
1 parent 606c84e commit ead1ab4

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

qase-mocha/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mocha-qase-reporter",
3-
"version": "1.1.6",
3+
"version": "1.1.7",
44
"description": "Mocha Cypress Reporter",
55
"homepage": "https://github.com/qase-tms/qase-javascript",
66
"sideEffects": false,

qase-mocha/src/extraReporters.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,15 @@ export function createExtraReporters(
101101
// Create reporter instance with clean options (without main reporter options)
102102
const cleanOptions = {
103103
...options,
104-
// Remove main reporter specific options
104+
// Remove main reporter property
105105
reporter: undefined,
106-
reporterOptions: undefined,
107-
'reporter-option': undefined,
108-
reporterOption: undefined,
109-
// Add extra reporter specific options
110-
...reporterOptions
106+
// Add extra reporter specific options to all reporter option properties
107+
// This ensures compatibility with different reporters that may expect different property names
108+
reporterOptions,
109+
reporterOption: reporterOptions,
110+
'reporter-option': reporterOptions
111111
};
112112

113-
// Special handling for JSON reporter
114-
if (reporterName === 'json' && reporterOptions['output']) {
115-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
116-
(cleanOptions as any).reporterOption = { output: reporterOptions['output'] };
117-
}
118-
119113
const reporter = new ReporterClass(runner, cleanOptions);
120114
reporters.push(reporter);
121115
}

0 commit comments

Comments
 (0)