Removed references to 'window'; using jasmine.getGlobal() instead in order to better support non-browser environments.
Better protection around access to console. The global object is now pretty-printed as "<global>", not "<window>". Tests are a little closer to passing in node.js.
This commit is contained in:
@@ -154,7 +154,8 @@ jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.log = function() {
|
||||
console.log.apply(console, arguments);
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) console.log.apply(console, arguments);
|
||||
};
|
||||
|
||||
jasmine.TrivialReporter.prototype.getLocation = function() {
|
||||
|
||||
Reference in New Issue
Block a user