Closed msimerson closed 5 years ago
Adding lint tests shows up in the Travis CI test output:
$ npm run lint
> sprintf-js@1.1.1 lint /home/travis/build/alexei/sprintf.js
> eslint .
The command "npm run lint" exited with 0.
1.25s
$ npm test
> sprintf-js@1.1.1 test /home/travis/build/alexei/sprintf.js
> mocha test/*.js
sprintfjs
✓ should return formated strings for simple placeholders
✓ should return formated strings for complex placeholders
✓ should return formated strings for callbacks
sprintfjs cache
✓ should not throw Error (cache consistency)
sprintfjs
✓ should throw SyntaxError for placeholders
✓ %b should throw TypeError for invalid numbers
✓ %b should not throw TypeError for something implicitly castable to number
✓ %c should throw TypeError for invalid numbers
✓ %c should not throw TypeError for something implicitly castable to number
✓ %d should throw TypeError for invalid numbers
✓ %d should not throw TypeError for something implicitly castable to number
✓ %i should throw TypeError for invalid numbers
✓ %i should not throw TypeError for something implicitly castable to number
✓ %e should throw TypeError for invalid numbers
✓ %e should not throw TypeError for something implicitly castable to number
✓ %f should throw TypeError for invalid numbers
✓ %f should not throw TypeError for something implicitly castable to number
✓ %g should throw TypeError for invalid numbers
✓ %g should not throw TypeError for something implicitly castable to number
✓ %u should throw TypeError for invalid numbers
✓ %u should not throw TypeError for something implicitly castable to number
✓ %x should throw TypeError for invalid numbers
✓ %x should not throw TypeError for something implicitly castable to number
✓ %X should throw TypeError for invalid numbers
✓ %X should not throw TypeError for something implicitly castable to number
✓ should not throw Error for expression which evaluates to undefined
✓ should throw own Error when expression evaluation would raise TypeError
✓ should not throw when accessing properties on the prototype
28 passing (16ms)
And if lint tests fails, the PR check fails. That lets contributors know their PR needs more work, without a maintainer having to point it out.
Questions: