Skip to content

Commit 0b0eef1

Browse files
authored
update deps (#229)
* Update most deps (except browserify and husky) * Mark the timers module used in fake-timers as external (thus not included) * fix linting issues after upgrades of common linting settings * Use Node 22 in runners * Make a link to the fake-timers docs * Revert "Use Node 22 in runners" This reverts commit 9db8b59. Tests using FileReader fails for whatever reason. Not sure how they worked to begin with in Node 16? It's JSDOM providing the API anyway.
1 parent d850163 commit 0b0eef1

File tree

5 files changed

+1355
-1336
lines changed

5 files changed

+1355
-1336
lines changed

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nise (偽)
1+
# nise (偽)
22

33
fake XHR and Server
44

@@ -219,7 +219,7 @@ This function also calls `useFakeXMLHttpRequest()`.
219219

220220
#### `var server = fakeServerWithClock.create();`
221221

222-
Creates a server that also manages fake timers.
222+
Creates a server that also manages [fake timers](https://github.com/sinonjs/fake-timers).
223223

224224
This is useful when testing `XHR` objects created with e.g. jQuery 1.3.x, which uses a timer to poll the object for completion, rather than the usual `onreadystatechange`.
225225

lib/fake-server/index.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ describe("sinonFakeServer", function () {
5353
"fakeServer.create should accept 'autoRespond' setting",
5454
);
5555
});
56+
5657
it("allows the 'autoRespondAfter' setting", function () {
5758
var server = sinonFakeServer.create({
5859
autoRespondAfter: 500,
@@ -63,6 +64,7 @@ describe("sinonFakeServer", function () {
6364
"fakeServer.create should accept 'autoRespondAfter' setting",
6465
);
6566
});
67+
6668
it("allows the 'respondImmediately' setting", function () {
6769
var server = sinonFakeServer.create({
6870
respondImmediately: true,
@@ -72,6 +74,7 @@ describe("sinonFakeServer", function () {
7274
"fakeServer.create should accept 'respondImmediately' setting",
7375
);
7476
});
77+
7578
it("allows the 'fakeHTTPMethods' setting", function () {
7679
var server = sinonFakeServer.create({
7780
fakeHTTPMethods: true,
@@ -81,6 +84,7 @@ describe("sinonFakeServer", function () {
8184
"fakeServer.create should accept 'fakeHTTPMethods' setting",
8285
);
8386
});
87+
8488
it("allows the 'unsafeHeadersEnabled' setting", function () {
8589
var server = sinon.fakeServer.create({
8690
unsafeHeadersEnabled: false,
@@ -94,6 +98,7 @@ describe("sinonFakeServer", function () {
9498
"fakeServer.create should accept 'unsafeHeadersEnabled' setting",
9599
);
96100
});
101+
97102
it("does not assign a non-allowlisted setting", function () {
98103
var server = sinonFakeServer.create({
99104
foo: true,
@@ -103,6 +108,7 @@ describe("sinonFakeServer", function () {
103108
"fakeServer.create should not accept 'foo' settings",
104109
);
105110
});
111+
106112
it("allows the 'legacyRoutes' setting", function () {
107113
var server = sinonFakeServer.create({
108114
legacyRoutes: false,

lib/fake-xhr/index.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,6 +2048,7 @@ describe("FakeXMLHttpRequest", function () {
20482048

20492049
describe("stub XHR", function () {
20502050
beforeEach(fakeXhrSetUp);
2051+
20512052
afterEach(fakeXhrTearDown);
20522053

20532054
it("returns FakeXMLHttpRequest constructor", function () {
@@ -2323,6 +2324,7 @@ describe("FakeXMLHttpRequest", function () {
23232324
if (typeof ActiveXObject === "undefined") {
23242325
describe("missing ActiveXObject", function () {
23252326
beforeEach(fakeXhrSetUp);
2327+
23262328
afterEach(fakeXhrTearDown);
23272329

23282330
it("does not expose ActiveXObject", function () {
@@ -2338,6 +2340,7 @@ describe("FakeXMLHttpRequest", function () {
23382340
} else {
23392341
describe("native ActiveXObject", function () {
23402342
beforeEach(fakeXhrSetUp);
2343+
23412344
afterEach(fakeXhrTearDown);
23422345

23432346
it("hijacks ActiveXObject", function () {
@@ -2412,6 +2415,7 @@ describe("FakeXMLHttpRequest", function () {
24122415

24132416
describe("with native XHR", function () {
24142417
beforeEach(fakeXhrSetUp);
2418+
24152419
afterEach(fakeXhrTearDown);
24162420

24172421
it("replaces global XMLHttpRequest", function () {

0 commit comments

Comments
 (0)