loading...

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

twitter logo github logo ・1 min read

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"
  },

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

twitter logo DISCUSS (2)
markdown guide
 

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>

 
Classic DEV Post from Jun 27 '19

Jack Of All Trades or Master of One?

That age old question: how many pies should one have a thumb in?

endan profile image
Reese’s peanut butter cup-fueled coding monster who dwells in the web. Also devours books, video games, anime, and manga. I write about everything!