Closed IanVS closed 9 years ago
Thanks again for the Pr - could you rather at this as
"scripts": {
autotest: mocha....
}
so you can do npm run-script autotest
to have mocha. Otherwise I would still leave the runner file for npm test
, since it removes mocha as a global dependency and is also the easiest to use for automated testing environments such as Travis :) Or you could also do it the other way around, have mocha
on the normal test
script and have the runner
file as another script, if that makes sense.
Sure, I didn't think about the dependency issue. I'll change it back so that mocha is only required to run with watch (it can't be done programmatically from the runner).
I think it's not too bad to have one watch command with the global mocha. There should just be an additional option for environments like travis that do not need a global mocha and don't watch :)
Ah yeah I think that is exactly what you said after reading a second time. My bad :P
OK, hopefully I got things right this time? Let me know if there are other considerations I've missed. Thanks!
Yep all looking good now from my side :)
To watch test files and run tests on changes, use "npm test -- --watch" from /server
Also adds a few more tests to check that validation errors are sent if username or password are blank.