MCPcopy Create free account
hub / github.com/caike/jQuery-Simple-Timer / onUnhandledRejection

Function onUnhandledRejection

tests/qunit-2.9.2.js:4227–4243  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

4225
4226 // Handle an unhandled rejection
4227 function onUnhandledRejection(reason) {
4228 var resultInfo = {
4229 result: false,
4230 message: reason.message || "error",
4231 actual: reason,
4232 source: reason.stack || sourceFromStacktrace(3)
4233 };
4234
4235 var currentTest = config.current;
4236 if (currentTest) {
4237 currentTest.assert.pushResult(resultInfo);
4238 } else {
4239 test("global failure", extend(function (assert) {
4240 assert.pushResult(resultInfo);
4241 }, { validTest: true }));
4242 }
4243 }
4244
4245 var QUnit = {};
4246 var globalSuite = new SuiteReport();

Callers

nothing calls this directly

Calls 3

sourceFromStacktraceFunction · 0.85
testFunction · 0.85
extendFunction · 0.85

Tested by

no test coverage detected