Supertest fails to test repeated post request
问题 I'm testing an api that creates users. The api does not allow the creation of users with the same login value. So I wrote the tests below: const app = require('../config/express'); //exports a configured express app const request = require('supertest'); const {populateUsers} = require('../seeders/users.seed'); beforeEach(populateUsers);//drop and populate database with some seeders describe('POST /v1/users', () => { it('#Post a new user - 201 status code', (done) => { request(app) .post('/v1