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