vendredi 19 mars 2021

"Error: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout." How to make my tests cases independents?

I have a test that, when it fails, makes all the following tests fail whearas the following ones are working perfectly fine (verified by adding .skip to the first failing test).

I am getting the error :

Error: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.

Which I don't understand because I use those :

    beforeEach(() => jest.clearAllMocks())

    afterEach(async () => await app.close())

What should I do to make those tests independent ?

Aucun commentaire:

Enregistrer un commentaire