DEV Community

endan
endan

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

Thanks!

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....

Discussion (2)

Collapse
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"

mochajs.org/#reporters

So it's

mocha -R <reporter>

Collapse
jjjjcccjjf profile image
endan Author

Thank you!!!!