MCPcopy Create free account
hub / github.com/Macuyiko/minecraft-python / expectedException

Function expectedException

ServerEditorWeb/ace/worker-html.js:9843–9857  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

9841};
9842
9843function expectedException(actual, expected) {
9844 if (!actual || !expected) {
9845 return false;
9846 }
9847
9848 if (Object.prototype.toString.call(expected) == '[object RegExp]') {
9849 return expected.test(actual);
9850 } else if (actual instanceof expected) {
9851 return true;
9852 } else if (expected.call({}, actual) === true) {
9853 return true;
9854 }
9855
9856 return false;
9857}
9858
9859function _throws(shouldThrow, block, expected, message) {
9860 var actual;

Callers 1

_throwsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected