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

Function runHook

tests/qunit-2.9.2.js:3067–3092  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3065 };
3066
3067 var runHook = function runHook() {
3068 if (hookName === "before") {
3069 if (hookOwner.unskippedTestsRun !== 0) {
3070 return;
3071 }
3072
3073 _this2.preserveEnvironment = true;
3074 }
3075
3076 // The 'after' hook should only execute when there are not tests left and
3077 // when the 'after' and 'finish' tasks are the only tasks left to process
3078 if (hookName === "after" && hookOwner.unskippedTestsRun !== numberOfUnskippedTests(hookOwner) - 1 && (config.queue.length > 0 || ProcessingQueue.taskCount() > 2)) {
3079 return;
3080 }
3081
3082 config.current = _this2;
3083 if (config.notrycatch) {
3084 callHook();
3085 return;
3086 }
3087 try {
3088 callHook();
3089 } catch (error) {
3090 _this2.pushFailure(hookName + " failed on " + _this2.testName + ": " + (error.message || error), extractStacktrace(error, 0));
3091 }
3092 };
3093
3094 return runHook;
3095 },

Callers

nothing calls this directly

Calls 3

numberOfUnskippedTestsFunction · 0.85
callHookFunction · 0.85
extractStacktraceFunction · 0.85

Tested by

no test coverage detected