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 54f67c1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/issues/issues-test.js
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,20 @@ describe("issues", function () {
});

if (typeof window !== "undefined") {

var throwsOnUnconfigurableProperty = false;
var preDescriptor = Object.getOwnPropertyDescriptor(window, "innerHeight");
/* eslint-disable no-restricted-syntax */
try {
Object.defineProperty(window, "innerHeight", { value: 10, configureable: true, writeable: true });
Object.defineProperty(window, "innerHeight", preDescriptor);
} catch (err) {
throwsOnUnconfigurableProperty = true;
}
/* eslint-enable no-restricted-syntax */

describe("#1456", function () {
if (throwsOnUnconfigurableProperty) { return; }
var sandbox;

beforeEach(function () {
Expand Down

0 comments on commit 54f67c1

Please sign in to comment.