what does grunt “test command” do on npm init

at first, the scripts-property in your package.json has nothing to do with grunt itself. its just a cli-command from npm, wich will be run if you run

$ npm test

read more about that here: https://npmjs.org/doc/scripts.html

e.g. if you test your application with the grunt & nodeunit you could just add that to the scripts-block

"scripts": {
  "test": "grunt nodeunit"
}

and your nodeunit-task is run if you run ‘npm test’

this basically makes it easier for continuous integration and so on, if you change your underlying testframework.

of course you could add an alias-task if you need more to be done before and after your tests are run (e.g. concatenation before, cleanup after)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)