adamgruber / mochawesome

A Gorgeous HTML/CSS Reporter for Mocha.js
https://gitter.im/mochawesome/general
MIT License
1.06k stars 160 forks source link

Mochawesome does not respect quiet reporter option #401

Closed jpshack-at-palomar closed 5 months ago

jpshack-at-palomar commented 5 months ago

Describe the bug

The documentation states that console logs can be silenced with a quiet=true reporter option, but attempt to set this via command line or .mocharc.json do not silence messages.

Code Reproduce

mocharc.json:

  "reporter": "mochawesome",
  "reporter-options": {
    "reportDir": "coverage/mocha",
    "quiet": true,
    "consoleReporter": "spec"
  },

OR command line:

mocha --require mochawesome/register --reporter=mochawesome --reporter-options quiet=true "test/**/*.test.ts"

** Note that I also tried variations with reporter-option instead of reporter-options with both CLI and .mocharc.json with no differences in the result.

Output:

...
173 passing (16s)
  35 pending

[mochawesome] Report JSON saved to /Users/jpshack/code/llm-swarm-space/workspace/llm-swarm-space/cli/mochawesome-report/mochawesome.json

[mochawesome] Report HTML saved to /Users/jpshack/code/llm-swarm-space/workspace/llm-swarm-space/cli/mochawesome-report/mochawesome.html

Expected behavior

Expected no console output from mochawesome.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

jpshack-at-palomar commented 5 months ago

Doh. My bad. This worked:

  "reporter": "mochawesome",
  "reporter-option": [
    "reportDir=coverage/mocha",
    "quiet=true",
    "consoleReporter=spec"
  ],