TritonDataCenter / node-assert-plus

Extra assertions on top of node's assert module
MIT License
122 stars 25 forks source link

assert-plus can be used for more than just validating parameters #28

Open joshwilsdon opened 8 years ago

joshwilsdon commented 8 years ago
> var assert = require('assert-plus');
undefined
> a = 6
6
> assert(a < 5, 'a must be less than 5');
AssertionError: a must be less than 5 (true) is required
[...]

the:

(true) is required

is unwanted here, since we're not always just checking a parameter.