From 36afaa5c093e0a55a4f520b6e04d9c3cacb78808 Mon Sep 17 00:00:00 2001 From: Lara Date: Mon, 8 Apr 2024 20:06:00 +0200 Subject: [PATCH] Faltaba cerrar app --- questionservice/server.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/questionservice/server.test.js b/questionservice/server.test.js index 8e0d3d9..df73004 100644 --- a/questionservice/server.test.js +++ b/questionservice/server.test.js @@ -1,8 +1,11 @@ const request = require('supertest'); -const axios = require('axios'); const app = require('./server'); const fs = require('fs'); +afterAll(async () => { + app.close(); +}); + describe('GET /pregunta', () => { it('debería devolver una pregunta y respuestas con éxito', async () => { const response = await request(app).get('/pregunta'); @@ -12,5 +15,7 @@ describe('GET /pregunta', () => { expect(response.body).toHaveProperty('answers'); expect(response.body.answers).toHaveLength(4); }); + + -}); \ No newline at end of file +});