Repository navigation
fix: give CLI reporter-option precedence over config file - #6331
Merged
mark-wiemer merged 2 commits intoSep 17, 2026
Merged
Conversation
In mergeConfigObjects, array options from higher-priority sources were prepended ahead of lower-priority ones. Downstream coerceReporterOption reduces with last-writer-wins semantics, so the config file value won over the CLI value. reporter-option values now accumulate in priority-LOW to HIGH order; every other array option keeps the existing order. Fixes mochajs#5532.
Contributor
Mixed activityActivity patterns show a mix of organic and automated signals. Evidence
This is an automated analysis by AgentScan |
This comment has been minimized.
This comment has been minimized.
3 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6331 +/- ##
==========================================
+ Coverage 63.30% 63.34% +0.03%
==========================================
Files 64 64
Lines 4963 4965 +2
Branches 1124 1125 +1
==========================================
+ Hits 3142 3145 +3
+ Misses 1821 1820 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
status: accepting prsOverview
--reporter-optiongiven on the CLI lost to the same key declared in an RC file or package.json. This PR makes reporter-option values accumulate in priority-LOW to HIGH order so the CLI value wins. Other array options keep the existing behavior.Tests
--reporter-optionnow overrides a clashing key from .mocharc.yml while keeping non-clashing config values