Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
Description
Analogue to assert.throws. Should be used to self-document when the expected failure mode for a test case is for an exception to be thrown. Will output a stack trace through doassert (note that output generated for uncaught exceptions currently does not even include a line number).
assert.doesNotThrow = function(func, params, msg) { ... }; |
assert.doesNotThrow.automsg = function(func, params) { ... }; |
Example usage:
assert.doesNotThrow(function() { db.foo.find({a:{$gt:0}}).itcount(); }, |
[],
|
"testing that the $gt operator is recognized"); |