mirror of
https://github.com/zebrajr/react.git
synced 2025-12-07 12:20:38 +01:00
log individual test results when in --debug mode
This commit is contained in:
parent
c1925db067
commit
4daeda1490
|
|
@ -16,6 +16,8 @@ exports.local = {
|
|||
}
|
||||
}
|
||||
|
||||
if (grunt.option('debug')) exports.local.url += '?debug=' + grunt.option('debug');
|
||||
|
||||
|
||||
exports.saucelabs = {
|
||||
webdriver: {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,19 @@
|
|||
console._log = console.log;
|
||||
console.log = function(message){
|
||||
console._log(message);
|
||||
postDataToURL({type:'log', message:message}, '/reportTestResults');
|
||||
}
|
||||
console._error = console.error;
|
||||
console.error = function(message){
|
||||
console._error(message);
|
||||
postDataToURL({type:'error', message:message}, '/reportTestResults');
|
||||
}
|
||||
|
||||
;(function(env){
|
||||
env.addReporter(new jasmine.JSReporter());
|
||||
if (location.search.substring(1).indexOf('debug') != -1){
|
||||
env.addReporter(new TAPReporter(console.log.bind(console)));
|
||||
}
|
||||
|
||||
function report(){
|
||||
if (typeof jasmine.getJSReport != 'function') {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user