mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Update vendor/qunit-clib to throw errors for failed tests in ringo, rhino, & narwhal.
This commit is contained in:
18
vendor/qunit-clib/qunit-clib.js
vendored
18
vendor/qunit-clib/qunit-clib.js
vendored
@@ -173,20 +173,26 @@
|
|||||||
console.log(' Finished in ' + details.runtime + ' milliseconds.');
|
console.log(' Finished in ' + details.runtime + ' milliseconds.');
|
||||||
console.log(hr);
|
console.log(hr);
|
||||||
|
|
||||||
// exit out of Narhwal, Rhino, or RingoJS
|
var fails = details.failed,
|
||||||
try {
|
error = fails + ' of ' + details.total + ' tests failed.';
|
||||||
quit();
|
|
||||||
} catch(e) { }
|
|
||||||
|
|
||||||
// exit out of Node.js or PhantomJS
|
// exit out of Node.js or PhantomJS
|
||||||
try {
|
try {
|
||||||
var process = context.process || context.phantom;
|
var process = context.process || context.phantom;
|
||||||
if (details.failed) {
|
if (fails) {
|
||||||
console.error('Error: ' + details.failed + ' of ' + details.total + ' tests failed.');
|
console.error('Error: ' + error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else {
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
} catch(e) {
|
||||||
|
if (fails) {
|
||||||
|
throw new Error(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// exit out of Narhwal, Rhino, or RingoJS
|
||||||
|
try {
|
||||||
|
quit();
|
||||||
} catch(e) { }
|
} catch(e) { }
|
||||||
};
|
};
|
||||||
}());
|
}());
|
||||||
|
|||||||
Reference in New Issue
Block a user