Move from global to Env
This commit is contained in:
@@ -41,7 +41,7 @@ describe("ExceptionFormatter", function() {
|
|||||||
|
|
||||||
describe("#stack", function() {
|
describe("#stack", function() {
|
||||||
it("formats stack traces from Webkit, Firefox, node.js or IE10+", function() {
|
it("formats stack traces from Webkit, Firefox, node.js or IE10+", function() {
|
||||||
if (jasmine.getGlobal().ieVersion < 10) { return; }
|
if (jasmine.getEnv().ieVersion < 10) { return; }
|
||||||
|
|
||||||
var error;
|
var error;
|
||||||
try { throw new Error("an error") } catch(e) { error = e; }
|
try { throw new Error("an error") } catch(e) { error = e; }
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ describe("matchersUtil", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("passes for equivalent frozen objects (GitHub issue #266)", function() {
|
it("passes for equivalent frozen objects (GitHub issue #266)", function() {
|
||||||
if (jasmine.getGlobal().ieVersion < 9) { return; }
|
if (jasmine.getEnv().ieVersion < 9) { return; }
|
||||||
|
|
||||||
var a = { foo: 1 },
|
var a = { foo: 1 },
|
||||||
b = {foo: 1 };
|
b = {foo: 1 };
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
(function(global) {
|
(function(env) {
|
||||||
global.ieVersion = (function() {
|
env.ieVersion = (function() {
|
||||||
var userAgent = jasmine.getGlobal().navigator.userAgent;
|
var userAgent = jasmine.getGlobal().navigator.userAgent;
|
||||||
if (!userAgent) { return Number.MAX_VALUE; }
|
if (!userAgent) { return Number.MAX_VALUE; }
|
||||||
|
|
||||||
@@ -7,4 +7,4 @@
|
|||||||
|
|
||||||
return match ? parseFloat(match[1]) : Number.MAX_VALUE;
|
return match ? parseFloat(match[1]) : Number.MAX_VALUE;
|
||||||
})();
|
})();
|
||||||
})(jasmine.getGlobal());
|
})(jasmine.getEnv());
|
||||||
|
|||||||
Reference in New Issue
Block a user