From 83151df20a0eccad14417b2cfb49f4eb481e132e Mon Sep 17 00:00:00 2001 From: Carl-Erik Kopseng Date: Fri, 13 Sep 2024 00:54:17 +0200 Subject: [PATCH] fix linting issues after upgrades of common linting settings --- lib/fake-server/index.test.js | 6 ++++++ lib/fake-xhr/index.test.js | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/lib/fake-server/index.test.js b/lib/fake-server/index.test.js index 537c696..21d8796 100644 --- a/lib/fake-server/index.test.js +++ b/lib/fake-server/index.test.js @@ -53,6 +53,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should accept 'autoRespond' setting", ); }); + it("allows the 'autoRespondAfter' setting", function () { var server = sinonFakeServer.create({ autoRespondAfter: 500, @@ -63,6 +64,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should accept 'autoRespondAfter' setting", ); }); + it("allows the 'respondImmediately' setting", function () { var server = sinonFakeServer.create({ respondImmediately: true, @@ -72,6 +74,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should accept 'respondImmediately' setting", ); }); + it("allows the 'fakeHTTPMethods' setting", function () { var server = sinonFakeServer.create({ fakeHTTPMethods: true, @@ -81,6 +84,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should accept 'fakeHTTPMethods' setting", ); }); + it("allows the 'unsafeHeadersEnabled' setting", function () { var server = sinon.fakeServer.create({ unsafeHeadersEnabled: false, @@ -94,6 +98,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should accept 'unsafeHeadersEnabled' setting", ); }); + it("does not assign a non-allowlisted setting", function () { var server = sinonFakeServer.create({ foo: true, @@ -103,6 +108,7 @@ describe("sinonFakeServer", function () { "fakeServer.create should not accept 'foo' settings", ); }); + it("allows the 'legacyRoutes' setting", function () { var server = sinonFakeServer.create({ legacyRoutes: false, diff --git a/lib/fake-xhr/index.test.js b/lib/fake-xhr/index.test.js index 4d9b1d6..3dd03f6 100644 --- a/lib/fake-xhr/index.test.js +++ b/lib/fake-xhr/index.test.js @@ -2048,6 +2048,7 @@ describe("FakeXMLHttpRequest", function () { describe("stub XHR", function () { beforeEach(fakeXhrSetUp); + afterEach(fakeXhrTearDown); it("returns FakeXMLHttpRequest constructor", function () { @@ -2323,6 +2324,7 @@ describe("FakeXMLHttpRequest", function () { if (typeof ActiveXObject === "undefined") { describe("missing ActiveXObject", function () { beforeEach(fakeXhrSetUp); + afterEach(fakeXhrTearDown); it("does not expose ActiveXObject", function () { @@ -2338,6 +2340,7 @@ describe("FakeXMLHttpRequest", function () { } else { describe("native ActiveXObject", function () { beforeEach(fakeXhrSetUp); + afterEach(fakeXhrTearDown); it("hijacks ActiveXObject", function () { @@ -2412,6 +2415,7 @@ describe("FakeXMLHttpRequest", function () { describe("with native XHR", function () { beforeEach(fakeXhrSetUp); + afterEach(fakeXhrTearDown); it("replaces global XMLHttpRequest", function () {