konobi / kwalitee

Package for measuring node package kwalitee
MIT License
12 stars 5 forks source link

Make 'npm test' actually do something (that returns 0 error code) #10

Closed tkissing closed 9 years ago

tkissing commented 9 years ago

It's still the default "there are no tests"

konobi commented 9 years ago

Yeah, that comes from npm init... or if it's not in the package.json, it comes from within npm as a default. It should always be in the package.json. Since the string can be totally freeform, not sure how/what to check.

tkissing commented 9 years ago

At the very least you could verify that it's there and not the default. Could also check for common test commands ("karma start", "grunt karma", "tape 'tests/*/.tap.js'" etc)

konobi commented 9 years ago

I suppose checking for '&&' might work. Defaults can change over time, as can common test commands, so not as big a fan of that.

tkissing commented 9 years ago

I doubt the "&& exit 1" part of the default will change anytime soon, so that should be safe to check for.