From 2ad310fe37edaf2798ae539ff2ec79c9d0b018a7 Mon Sep 17 00:00:00 2001 From: --local Date: Wed, 8 Aug 2018 07:10:05 +0200 Subject: [PATCH] Review: add assertion --- test/issues/issues-test.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/issues/issues-test.js b/test/issues/issues-test.js index ab4a34a62..30e32ac9b 100644 --- a/test/issues/issues-test.js +++ b/test/issues/issues-test.js @@ -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(); + }); }); }); });