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:
@@ -12,4 +12,14 @@ describe("jasmine.log", function() {
|
||||
jasmine.log(1, 2, 3);
|
||||
expect(jasmine.getEnv().currentSpec.log).wasCalledWith(1, 2, 3);
|
||||
});
|
||||
});
|
||||
|
||||
describe("jasmine.getGlobal", function() {
|
||||
it("should return the global object", function() {
|
||||
var globalObject = (function() {
|
||||
return this;
|
||||
})();
|
||||
|
||||
expect(jasmine.getGlobal()).toBe(globalObject);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user