Skip to content

Commit

Permalink
Review: only wrap the sort function
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Aug 9, 2018
1 parent 2ad310f commit 6d56bbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,11 +511,13 @@ describe("issues", function () {

describe("#1796 - cannot stub Array.prototype.sort", function () {
it("it should not fail with RangeError", function () {
var stub = sinon.stub(Array.prototype, "sort");

refute.exception(function () {
var stub = sinon.stub(Array.prototype, "sort");
[1, 2, 3].sort();
stub.restore();
});

stub.restore();
});
});
});

0 comments on commit 6d56bbf

Please sign in to comment.