MCPcopy Index your code
hub / github.com/caolan/nodeunit / expectedException

Function expectedException

lib/assert.js:301–315  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

299};
300
301function expectedException(actual, expected) {
302 if (!actual || !expected) {
303 return false;
304 }
305
306 if (expected instanceof RegExp) {
307 return expected.test(actual.message || actual);
308 } else if (actual instanceof expected) {
309 return true;
310 } else if (expected.call({}, actual) === true) {
311 return true;
312 }
313
314 return false;
315}
316
317function _throws(shouldThrow, block, expected, message) {
318 var actual;

Callers 1

_throwsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…