Skip to content

Commit

Permalink
fix(tests): node 20 needs longer teardown timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Mairu committed Dec 26, 2023
1 parent 0aa8a94 commit c5d35a6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/ui.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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 => {
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit c5d35a6

Please sign in to comment.