Relative Content

Tag Archive for javascripttestingjestjs

Jest testing keeps running forever

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 […]

Jest javascript test, why is it not failing?

Im in an ealy stage of testing with Jest, probably a basic question.
Having a hard time, why this test is not failing? The auth_token property,
is a string, but I have set it to be Number – in order to make it fail.