In " npm test -t mongoclient " what is the -t used for?

In the command :
npm test -t mongoclient
What is the meaning and use of -t ?

This might be a simple question, but didn’t succeed to get an answer. I also noticed that if I execute the command without the " -t "
npm test mongoclient
I get the same successful result.

Thanks

1 Like

Hi @Jeremie_55798,

The option -t is to specify single test. It seems like an alias as mentioned here
There are many ways to test:

  • npm test executes all the tests present.
  • npm test -t mongoclient executes only a single test

Kanika

1 Like

Thanks @Kanika,
Okay that’s clearer now. However I now wonder about the command
npm test -t mongoclient
What is the point using the -t option if we specify the test name , “mongoclient” in this case ?