const app = core.returnInstance();
const payloadCorrectLoginCredentials = {
email: '[email protected]',
password: '1234'
};
I have created a small jest test, and it seems like running forever:
describe('Customer api', () => {
test('[POST] /login, with correct credentials', async () => {
const response = await request(app)
.post('/api/customer/login')
.set('Content-Type', 'application/x-www-form-urlencoded')
.send(payloadCorrectLoginCredentials)
expect(response.statusCode).toBe(200);
});
});
I have tried to actually closing the server when the jest call is done, then again, how to mark it done() in async?