Skip to content

Commit

Permalink
Add test for #1796, failing to stub Array.prototype.sort
Browse files Browse the repository at this point in the history
This was fixed in c2c7814
  • Loading branch information
mroderick committed Aug 9, 2018
1 parent 638e104 commit 0ee6a4e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/issues/issues-test.js
Expand Up @@ -508,4 +508,12 @@ describe("issues", function () {
sinon.assert.calledWith(spy, secondObj);
});
});

describe("#1796 - cannot stub Array.prototype.sort", function () {
it("it should not fail with RangeError", function () {
var stub = sinon.stub(Array.prototype, "sort");
[1, 2, 3].sort();
stub.restore();
});
});
});

0 comments on commit 0ee6a4e

Please sign in to comment.