-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
invalidnot something we need to work on, such as a non-reproducing issue or an external root causenot something we need to work on, such as a non-reproducing issue or an external root cause
Description
Prerequisites
- Checked that your issue hasn't already been filed by cross-referencing issues with the
faqlabel - Checked next-gen ES issues and syntax problems by using the same environment and/or transpiler configuration without Mocha to ensure it isn't just a feature that actually isn't supported in the environment in question or a bug in your code.
- 'Smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, your usage of Mocha, or Mocha itself
- Ensured that there is no discrepancy between the locally and globally installed versions of Mocha. You can find them with:
node node_modules/.bin/mocha --version(Local) andmocha --version(Global). We recommend that you not install Mocha globally.
Description
Mocha doesn't override reporter-options value defined in mocha.opts with the one defined on command line.
Steps to Reproduce
- Define a mocha.ops file with
reporter-options:
--recursive
--reporter=xunit
--reporter-options output=./test-reports/junit.xml
- Call mocha using a different value for
reporter-option
node node_modules/mocha/bin/mocha --reporter-options output=./test-reports/unit.xml
- Verify that mocha has created
./test-reports/junit.xmland not./test-reports/unit.xml
Expected behavior: [What you expect to happen]
Mocha should use the reporter-options specified on the command-line instead of the one defined in mocha.opts.
Actual behavior: [What actually happens]
Mocha use the reporter-options defined in mocha.opts instead of the one specified on the command-line.
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
- mocha: 6.0.0-6.1.4 (works fine with version 5.2.0) -- mocha is not installed globally
- node: 8.14.1 / 10.15.3 / 12.4.0
- Your operating system
- name and version: windows 10 1903 / debian stretch
- architecture (32 or 64-bit): 64bit
- Your shell (e.g., bash, zsh, PowerShell, cmd): PowerShell / bash
Metadata
Metadata
Assignees
Labels
invalidnot something we need to work on, such as a non-reproducing issue or an external root causenot something we need to work on, such as a non-reproducing issue or an external root cause