mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Update qunit-extras to respect QUnit.config.hidepassed.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
<script>
|
||||
var lodash = _.noConflict();
|
||||
|
||||
QUnit.config.asyncRetries = 5;
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
// excuse tests we intentionally fail or those with problems
|
||||
|
||||
@@ -9335,6 +9335,7 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.config.asyncRetries = 10;
|
||||
QUnit.config.hidepassed = true;
|
||||
|
||||
if (!document) {
|
||||
QUnit.config.noglobals = true;
|
||||
|
||||
27
vendor/qunit-extras/qunit-extras.js
vendored
27
vendor/qunit-extras/qunit-extras.js
vendored
@@ -408,15 +408,17 @@
|
||||
}
|
||||
ran = true;
|
||||
|
||||
var failures = details.failed;
|
||||
|
||||
logInline('');
|
||||
console.log(hr);
|
||||
console.log(' PASS: ' + details.passed + ' FAIL: ' + details.failed + ' TOTAL: ' + details.total);
|
||||
console.log(' PASS: ' + details.passed + ' FAIL: ' + failures + ' TOTAL: ' + details.total);
|
||||
console.log(' Finished in ' + details.runtime + ' milliseconds.');
|
||||
console.log(hr);
|
||||
|
||||
// exit out of Node.js or PhantomJS
|
||||
try {
|
||||
if (details.failed) {
|
||||
if (failures) {
|
||||
process.exit(1);
|
||||
} else {
|
||||
process.exit(0);
|
||||
@@ -425,7 +427,7 @@
|
||||
|
||||
// exit out of Narwhal, Rhino, or RingoJS
|
||||
try {
|
||||
if (details.failed) {
|
||||
if (failures) {
|
||||
java.lang.System.exit(1);
|
||||
} else {
|
||||
quit();
|
||||
@@ -469,10 +471,12 @@
|
||||
|
||||
// add a callback to be triggered after a test is completed
|
||||
QUnit.testDone(function(details) {
|
||||
var logs = QUnit.config.extrasData.logs,
|
||||
var config = QUnit.config,
|
||||
failures = details.failed,
|
||||
logs = config.extrasData.logs,
|
||||
testName = details.name;
|
||||
|
||||
if (details.failed > 0) {
|
||||
if (!config.hidepassed || failures) {
|
||||
logInline('');
|
||||
if (!modulePrinted) {
|
||||
modulePrinted = true;
|
||||
@@ -480,12 +484,15 @@
|
||||
console.log(moduleName);
|
||||
console.log(hr);
|
||||
}
|
||||
var index = -1,
|
||||
length = logs.length;
|
||||
console.log(' ' + (failures ? 'FAIL' : 'PASS') + ' - ' + testName);
|
||||
|
||||
console.log(' FAIL - ' + testName);
|
||||
while(++index < length) {
|
||||
console.log(' ' + logs[index]);
|
||||
if (failures) {
|
||||
var index = -1,
|
||||
length = logs.length;
|
||||
|
||||
while(++index < length) {
|
||||
console.log(' ' + logs[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
logs.length = 0;
|
||||
|
||||
Reference in New Issue
Block a user