mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Cleanup throbber interval in vendor/qunit-extras.
This commit is contained in:
19
vendor/qunit-extras/qunit-extras.js
vendored
19
vendor/qunit-extras/qunit-extras.js
vendored
@@ -180,8 +180,7 @@
|
||||
var isWindows = /win/i.test(os);
|
||||
|
||||
/** Used to display the wait throbber */
|
||||
var throbberId,
|
||||
throbberDelay = 500,
|
||||
var throbberDelay = 500,
|
||||
waitCount = -1;
|
||||
|
||||
/** Shorten `context.QUnit.QUnit` to `context.QUnit` */
|
||||
@@ -495,11 +494,6 @@
|
||||
moduleName = newModuleName;
|
||||
modulePrinted = false;
|
||||
}
|
||||
// initialize the wait throbber
|
||||
if (!throbberId) {
|
||||
throbberId = context.setInterval(logThrobber, throbberDelay);
|
||||
logThrobber();
|
||||
}
|
||||
});
|
||||
|
||||
// add a callback to be triggered after a test is completed
|
||||
@@ -606,9 +600,6 @@
|
||||
}());
|
||||
} catch(e) { }
|
||||
|
||||
// add `console.log` support to Narwhal, Rhino, and RingoJS
|
||||
console || (console = context.console = { 'log': context.print });
|
||||
|
||||
// expose shortcuts
|
||||
// exclude `module` because some environments have it as a built-in object
|
||||
('asyncTest deepEqual equal equals expect notDeepEqual notEqual notStrictEqual ' +
|
||||
@@ -616,6 +607,14 @@
|
||||
context[methodName] = QUnit[methodName];
|
||||
});
|
||||
|
||||
// add `console.log` support to Narwhal, Rhino, and RingoJS
|
||||
if (!console) {
|
||||
console = context.console = { 'log': context.print };
|
||||
}
|
||||
// start log throbber
|
||||
if (!isSilent) {
|
||||
context.setInterval(logThrobber, throbberDelay);
|
||||
}
|
||||
// must call `QUnit.start` in the test file if not loaded in a browser
|
||||
QUnit.config.autostart = false;
|
||||
QUnit.init();
|
||||
|
||||
Reference in New Issue
Block a user