From 28f71d6cbbed2d47d7f5347cb46dd64f16702521 Mon Sep 17 00:00:00 2001 From: David Ortner Date: Wed, 13 Sep 2023 00:53:01 +0200 Subject: [PATCH] #1059@patch: Increases timeout for when Window.happyDOM.whenAsyncComplete(). --- .../src/async-task-manager/AsyncTaskManager.ts | 2 +- packages/happy-dom/test/fetch/Fetch.test.ts | 2 +- packages/happy-dom/test/fetch/Request.test.ts | 12 ++++++------ packages/happy-dom/test/fetch/Response.test.ts | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts b/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts index 628f67dec..ef08e634e 100644 --- a/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts +++ b/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts @@ -137,7 +137,7 @@ export default class AsyncTaskManager { } else { this.endTimer(timerID); } - }); + }, 10); this.startTimer(timerID); } } diff --git a/packages/happy-dom/test/fetch/Fetch.test.ts b/packages/happy-dom/test/fetch/Fetch.test.ts index 9c28b60c4..22c63f13e 100644 --- a/packages/happy-dom/test/fetch/Fetch.test.ts +++ b/packages/happy-dom/test/fetch/Fetch.test.ts @@ -3427,7 +3427,7 @@ describe('Fetch', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 110); + }, 120); }); }); }); diff --git a/packages/happy-dom/test/fetch/Request.test.ts b/packages/happy-dom/test/fetch/Request.test.ts index a26e85d3e..b75c4f9ad 100644 --- a/packages/happy-dom/test/fetch/Request.test.ts +++ b/packages/happy-dom/test/fetch/Request.test.ts @@ -498,7 +498,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -539,7 +539,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -573,7 +573,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -606,7 +606,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -641,7 +641,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -677,7 +677,7 @@ describe('Request', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); diff --git a/packages/happy-dom/test/fetch/Response.test.ts b/packages/happy-dom/test/fetch/Response.test.ts index 4d2e3b675..93121e273 100644 --- a/packages/happy-dom/test/fetch/Response.test.ts +++ b/packages/happy-dom/test/fetch/Response.test.ts @@ -135,7 +135,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -172,7 +172,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -241,7 +241,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -276,7 +276,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); }); @@ -385,7 +385,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); @@ -409,7 +409,7 @@ describe('Response', () => { setTimeout(() => { expect(isAsyncComplete).toBe(true); resolve(null); - }, 20); + }, 30); }); }); });