Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between npm t and npm run test

I've seen some people use the command npm t when running tests. Is this command any different to running npm run test?

like image 379
cham Avatar asked Jul 14 '19 22:07

cham


2 Answers

TL;DR there is no difference.

It's just a shortcut for npm tests which run the test command in the package.json file. npm run test performs the same action in this case.

like image 190
seballos Avatar answered Sep 22 '22 19:09

seballos


Following on from Andy Ray's comment, the documentation states that t is an alias for test.

npm help t
like image 33
cham Avatar answered Sep 25 '22 19:09

cham