Skip to content

Commit 9040d24

Browse files
chore(deps): update external fixes (#317)
* chore(deps): update external fixes * test: debug flaky tests * test: debug flaky tests * test: debug flaky tests * test: debug flaky tests * test: debug flaky tests Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Stefan Guggisberg <[email protected]>
1 parent a209c93 commit 9040d24

File tree

8 files changed

+33
-59
lines changed

8 files changed

+33
-59
lines changed

package-lock.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prepare": "husky install"
1111
},
1212
"mocha": {
13-
"timeout": "5000",
13+
"timeout": "10000",
1414
"recursive": "true",
1515
"reporter": "mocha-multi-reporters",
1616
"reporter-options": "configFile=.mocha-multi.json"
@@ -52,7 +52,7 @@
5252
"dependencies": {
5353
"debug": "4.3.4",
5454
"http-cache-semantics": "4.1.0",
55-
"lru-cache": "7.14.0"
55+
"lru-cache": "7.14.1"
5656
},
5757
"devDependencies": {
5858
"@semantic-release/changelog": "6.0.1",
@@ -61,7 +61,7 @@
6161
"chai-as-promised": "7.1.1",
6262
"chai-bytes": "0.1.2",
6363
"chai-iterator": "3.0.2",
64-
"eslint": "8.26.0",
64+
"eslint": "8.27.0",
6565
"eslint-config-airbnb-base": "15.0.0",
6666
"eslint-plugin-header": "3.1.1",
6767
"eslint-plugin-import": "2.26.0",

src/core/h2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ const request = async (ctx, url, options) => {
273273
req.once('error', (err) => {
274274
// error occured during the request
275275
session.off('error', onSessionError);
276-
/* istanbul ignore else */
276+
/* istanbul ignore next */
277277
if (signal) {
278278
signal.removeEventListener('abort', onAbortSignal);
279279
}

test/core/index.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ describe('Core Tests', () => {
190190
assert((ts1 - ts0) < 10);
191191
});
192192

193-
it('AbortController works (slow response)', async function test() {
194-
this.timeout(5000);
195-
193+
it('AbortController works (slow response)', async () => {
196194
const controller = new AbortController();
197195
setTimeout(() => controller.abort(), 1000);
198196
const { signal } = controller;
@@ -564,9 +562,7 @@ describe('Core Tests', () => {
564562
}
565563
});
566564

567-
it('HTTP/2 server push can be rejected', async function test() {
568-
this.timeout(5000);
569-
565+
it('HTTP/2 server push can be rejected', async () => {
570566
const pushPromiseHandler = (url, headers, reject) => {
571567
// we're not interested, cancel push promise
572568
reject();

test/fetch/cache.test.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ describe('Cache Tests', () => {
185185
await ctx.reset();
186186
});
187187

188-
it('fetch supports max-age directive', async function test() {
189-
this.timeout(5000);
190-
188+
it('fetch supports max-age directive', async () => {
191189
// max-age=3 seconds
192190
const url = 'https://httpbin.org/cache/3';
193191
// send request
@@ -341,9 +339,7 @@ describe('Cache Tests', () => {
341339
assert.deepStrictEqual(JSON.parse(await resp.text()), json);
342340
});
343341

344-
it('fetch supports HTTP/2 server push', async function test() {
345-
this.timeout(5000);
346-
342+
it('fetch supports HTTP/2 server push', async () => {
347343
// returns a promise which resolves with the url of the pushed resource
348344
const receivedPush = () => new Promise((resolve) => {
349345
// eslint-disable-next-line no-unused-vars
@@ -379,9 +375,7 @@ describe('Cache Tests', () => {
379375
}
380376
});
381377

382-
it('test redundant server push', async function test() {
383-
this.timeout(5000);
384-
378+
it('test redundant server push', async () => {
385379
let pushedResponse;
386380
const receivedPush = () => new Promise((resolve) => {
387381
onPush((url, response) => {

test/fetch/index.http1.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ testParams.forEach((params) => {
177177
}
178178
});
179179

180-
it(`concurrent HTTP/1.1 requests to same origin (${name})`, async function test() {
181-
this.timeout(5000);
182-
180+
it(`concurrent HTTP/1.1 requests to same origin (${name})`, async () => {
183181
const { fetch, reset } = context({ alpnProtocols: [ALPN_HTTP1_1] });
184182
const N = 200; // # of parallel requests
185183
// httpbingo.org seems to be more stable than httpbin.org
@@ -228,9 +226,7 @@ testParams.forEach((params) => {
228226
});
229227
});
230228

231-
it(`concurrent HTTP/1.1 requests to same origin using different contexts (${name})`, async function test() {
232-
this.timeout(5000);
233-
229+
it(`concurrent HTTP/1.1 requests to same origin using different contexts (${name})`, async () => {
234230
const doFetch = async (ctx, url) => ctx.fetch(url);
235231

236232
const N = 50; // # of parallel requests

test/fetch/index.http2.test.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ describe('HTTP/2-specific Fetch Tests', () => {
101101
assert.strictEqual(+response.headers.get('content-length'), buf.length);
102102
});
103103

104-
it('HTTP/2 server push can be disabled', async function test() {
105-
this.timeout(5000);
106-
104+
it('HTTP/2 server push can be disabled', async () => {
107105
const ctx = context({ h2: { enablePush: false } });
108106

109107
const handler = sinon.fake();
@@ -124,9 +122,7 @@ describe('HTTP/2-specific Fetch Tests', () => {
124122
}
125123
});
126124

127-
it('concurrent HTTP/2 requests to same origin', async function test() {
128-
this.timeout(5000);
129-
125+
it('concurrent HTTP/2 requests to same origin', async () => {
130126
const N = 500; // # of parallel requests
131127
const TEST_URL = 'https://httpbin.org/bytes/'; // HTTP2
132128
// generete array of 'randomized' urls
@@ -160,9 +156,7 @@ describe('HTTP/2-specific Fetch Tests', () => {
160156
assert.notStrictEqual(results[1], results[2]);
161157
});
162158

163-
it('concurrent HTTP/2 requests to same origin using different contexts', async function test() {
164-
this.timeout(5000);
165-
159+
it('concurrent HTTP/2 requests to same origin using different contexts', async () => {
166160
const doFetch = async (ctx, url) => ctx.fetch(url);
167161

168162
const N = 50; // # of parallel requests

test/fetch/index.test.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,7 @@ testParams.forEach((params) => {
210210
assert(body.destroyed);
211211
});
212212

213-
it('timeoutSignal works (slow response)', async function test() {
214-
this.timeout(5000);
215-
213+
it('timeoutSignal works (slow response)', async () => {
216214
const signal = timeoutSignal(500);
217215

218216
const method = 'POST';
@@ -232,9 +230,7 @@ testParams.forEach((params) => {
232230
assert(body.destroyed);
233231
});
234232

235-
it('AbortController works (slow response)', async function test() {
236-
this.timeout(5000);
237-
233+
it('AbortController works (slow response)', async () => {
238234
const controller = new AbortController();
239235
setTimeout(() => controller.abort(), 1000);
240236
const { signal } = controller;
@@ -272,9 +268,7 @@ testParams.forEach((params) => {
272268
}
273269
});
274270

275-
it('AbortController works (dripping response)', async function test() {
276-
this.timeout(5000);
277-
271+
it('AbortController works (dripping response)', async () => {
278272
const FETCH_TIMEOUT = 1000; // ms
279273
const DRIPPING_DURATION = 2; // seconds
280274
// doesn't support POST method

0 commit comments

Comments
 (0)