From c5d35a600aba2fc8636229e806714208eb3b7ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gro=C3=9Fe?= Date: Tue, 26 Dec 2023 17:18:24 +0100 Subject: [PATCH] fix(tests): node 20 needs longer teardown timeouts --- test/ui.test.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/ui.test.js b/test/ui.test.js index 4a5b65e..e69ac8a 100644 --- a/test/ui.test.js +++ b/test/ui.test.js @@ -25,11 +25,11 @@ describe('feathers-swagger.swaggerUI', () => { const { initApp } = options; describe(`when using ${type}`, () => { - let server; + let app; let messageService; const startServiceWithUi = (ui) => { - const app = initApp() + app = initApp() .configure( swagger({ docsPath: '/docs', @@ -45,7 +45,7 @@ describe('feathers-swagger.swaggerUI', () => { ) .use('/messages', messageService); - return startFeathersApp(app, 6776).then(res => { server = res; }); + return startFeathersApp(app, 6776); }; before(done => { @@ -73,7 +73,12 @@ describe('feathers-swagger.swaggerUI', () => { done(); }); - afterEach(done => server.close(done)); + afterEach(function (done) { + this.timeout(50000); + app.teardown().then(() => { + done(); + }); + }); ['/docs', '/docs/'].forEach((requestPath) => { it(`should serve default SwaggerUI under ${requestPath}`, async () => {