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:
Lee Byrd & Christian Williams
2010-06-22 16:22:09 -07:00
parent e60f22a2e5
commit 01d842fdfd
10 changed files with 69 additions and 62 deletions

View File

@@ -34,6 +34,7 @@ jasmine.Reporters.reporter = function(callbacks) {
that.doCallback(that.callbacks.specCallback, spec);
},
log: function (str) {
var console = jasmine.getGlobal().console;
if (console && console.log) console.log(str);
}
};