DEV Community


Posted on

What does "-R min" flag means in my test script in package.json?

Hello all. I can't find the answer on google and on the docs. I don't want to post in Stackoverflow either. Any ideas what the -R min flag means?

  "scripts": {
    "test": "nodemon --exec \"mocha -R min\"",
    "start": "nodemon app.js"

Enter fullscreen mode Exit fullscreen mode


EDIT: Okay, I figured out the min flag. It supressed verbose test messages.

Without min flag: √ it should GET all the users (78ms)
With min flag: 1 passing (156ms)

How about -R?

EDIT #2: Okay, the -R flag and min argument are supposed to go together. As @weswedding said, it's the Reporter flag and the next word is the name of the reporter. In this case, min.

And of course, it's all in the docs....

Top comments (2)

weswedding profile image
Weston Wedding • Edited

That usually means "recursive" in command-line speak so I initially thought that was what it was, but in this case you are specifying the "reporter"

So it's

mocha -R <reporter>

jjjjcccjjf profile image

Thank you!!!!