From be4e53b8fe0b4bec88c9579c88945499c1e598ca Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Fri, 26 May 2017 13:25:52 +0200 Subject: [PATCH] Add failing tests for sandbox.reset() --- test/sandbox-test.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/sandbox-test.js b/test/sandbox-test.js index b3176c9a5..46d1d48d9 100644 --- a/test/sandbox-test.js +++ b/test/sandbox-test.js @@ -56,6 +56,22 @@ describe("sinonSandbox", function () { assert.same(sandbox.assert, sinonAssert); }); + it("can be reset without failing when pre-configured to use a fake server", function () { + var sandbox = sinonSandbox.create({useFakeServer: true}); + refute.exception(function () { + sandbox.reset(); + }); + }); + + it("can be reset without failing when configured to use a fake server", function () { + var sandbox = sinonSandbox.create(); + sandbox.useFakeServer(); + refute.exception(function () { + sandbox.reset(); + }); + }); + + describe(".useFakeTimers", function () { beforeEach(function () { this.sandbox = Object.create(sinonSandbox);