Skip to content

Commit

Permalink
Avoid running test for sinonjs#1456 on Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
fatso83 committed Jul 4, 2017
1 parent 1108117 commit 286b0a2
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ var configureLogError = require("../../lib/sinon/util/core/log_error.js");
var assert = referee.assert;
var refute = referee.refute;


describe("issues", function () {
beforeEach(function () {
this.sandbox = sinon.sandbox.create();
Expand Down Expand Up @@ -252,7 +251,17 @@ describe("issues", function () {
});

if (typeof window !== "undefined") {
describe("#1456", function () {

var throwsOnUnconfigurableProperty = false;
var preDescriptor = Object.getOwnPropertyDescriptor(window, "innerHeight");
try {
Object.defineProperty(window, "innerHeight", { value: 10, configureable: true, writeable: true });
Object.defineProperty(window, "innerHeight", preDescriptor);
} catch (err) {
throwsOnUnconfigurableProperty = true;
}

(throwsOnUnconfigurableProperty? describe.skip : describe)("#1456", function () {
var sandbox;

beforeEach(function () {
Expand Down

0 comments on commit 286b0a2

Please sign in to comment.