Skip to content

Commit

Permalink
Review: add assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Aug 9, 2018
1 parent 0ee6a4e commit 2ad310f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,11 @@ 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");
[1, 2, 3].sort();
stub.restore();
refute.exception(function () {
var stub = sinon.stub(Array.prototype, "sort");
[1, 2, 3].sort();
stub.restore();
});
});
});
});

0 comments on commit 2ad310f

Please sign in to comment.