Skip to content

Commit

Permalink
Faltaba cerrar app
Browse files Browse the repository at this point in the history
uo276026 committed Apr 8, 2024
1 parent 0279337 commit 36afaa5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions questionservice/server.test.js
Original file line number Diff line number Diff line change
@@ -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);
});



});
});

0 comments on commit 36afaa5

Please sign in to comment.