From b45db3bc5f2b84c32405ec9c6e8df96615e3d607 Mon Sep 17 00:00:00 2001 From: restrry Date: Tue, 22 Jun 2021 09:58:08 +0300 Subject: [PATCH] fix type error --- .../server/http/integration_tests/request.test.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/server/http/integration_tests/request.test.ts b/src/core/server/http/integration_tests/request.test.ts index 4afe489a57148..dfc47098724cc 100644 --- a/src/core/server/http/integration_tests/request.test.ts +++ b/src/core/server/http/integration_tests/request.test.ts @@ -170,13 +170,11 @@ describe('KibanaRequest', () => { const nextSpy = jest.fn(); - const done = new Promise((resolve) => { + const done = new Promise((resolve) => { router.get({ path: '/', validate: false }, async (context, request, res) => { request.events.aborted$.subscribe({ next: nextSpy, - complete: () => { - resolve(); - }, + complete: resolve, }); // prevents the server to respond @@ -310,13 +308,11 @@ describe('KibanaRequest', () => { const nextSpy = jest.fn(); - const done = new Promise((resolve) => { + const done = new Promise((resolve) => { router.get({ path: '/', validate: false }, async (context, req, res) => { req.events.completed$.subscribe({ next: nextSpy, - complete: () => { - resolve(); - }, + complete: resolve, }); expect(nextSpy).not.toHaveBeenCalled();