making client logs more visible
This commit is contained in:
parent
17190d25c1
commit
27512c9dc6
@ -131,7 +131,9 @@ module.exports = function(grunt) {
|
||||
});
|
||||
|
||||
phantomjs.on('console',console.log.bind(console));
|
||||
phantomjs.on('verbose',grunt.verbose.writeln.bind(grunt.verbose));
|
||||
phantomjs.on('verbose',function(msg) {
|
||||
grunt.verbose.writeln('\nlog: '.yellow + msg);
|
||||
});
|
||||
phantomjs.on('debug', grunt.log.debug.bind(grunt.log, 'phantomjs'));
|
||||
phantomjs.on('write', grunt.log.write.bind(grunt.log));
|
||||
phantomjs.on('writeln', grunt.log.writeln.bind(grunt.log));
|
||||
|
@ -7,7 +7,7 @@ var phantom = {};
|
||||
|
||||
if (window._phantom) {
|
||||
console.log = function(){
|
||||
phantom.sendMessage('verbose',Array.prototype.slice.apply(arguments).join(', '));
|
||||
phantom.sendMessage('verbose', Array.prototype.slice.apply(arguments).join(', '));
|
||||
};
|
||||
}
|
||||
|
||||
|
1
test/fixtures/pivotal/src/Player.js
vendored
1
test/fixtures/pivotal/src/Player.js
vendored
@ -10,6 +10,7 @@ Player.prototype.pause = function() {
|
||||
};
|
||||
|
||||
Player.prototype.resume = function() {
|
||||
console.log('in resume');
|
||||
if (this.isPlaying) {
|
||||
throw new Error("song is already playing");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user