Only redirect output to browser when running in CI.
This commit is contained in:
parent
0f6617ec26
commit
15ba32b489
1 changed files with 15 additions and 13 deletions
|
@ -25,21 +25,23 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
require('coffee-script'); // Supports .coffee tests.
|
require('coffee-script'); // Supports .coffee tests.
|
||||||
|
var ipc = require('ipc');
|
||||||
|
|
||||||
// Rediret all output to browser.
|
// Rediret all output to browser.
|
||||||
var ipc = require('ipc');
|
if (isCi) {
|
||||||
global.__defineGetter__('console', function() {
|
global.__defineGetter__('console', function() {
|
||||||
return {
|
return {
|
||||||
log: function() {
|
log: function() {
|
||||||
args = Array.prototype.slice.call(arguments);
|
args = Array.prototype.slice.call(arguments);
|
||||||
ipc.sendChannel('console.log', args);
|
ipc.sendChannel('console.log', args);
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
args = Array.prototype.slice.call(arguments);
|
args = Array.prototype.slice.call(arguments);
|
||||||
ipc.sendChannel('console.error', args);
|
ipc.sendChannel('console.error', args);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var Mocha = require('mocha');
|
var Mocha = require('mocha');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue