jeudi 25 juillet 2019

How to execute mocha hooks sequentially when executing multiple tests recursively?

Mocha doesn't seem to run the hooks sequentially along with the tests when run in recursive mode.

This is what's happening. Notice the numbers 1,3,5. These are console logs from three different test files.

1
API running on localhost:8001
connected to db  mongodb://localhost/tests
3
API running on localhost:8002
5
API running on localhost:8004
  API :: AUTH
    POST /login
      ✓ should login with email contains capital latters
      ✓ should login with email contains all lower case
      ✓ should require an email to login
      ✓ should require a password to login
      ✓ should not login with incorrect email
      ✓ should not login with incorrect password


I wanted to run the 1 only , exec its tests and then the after hook. But its not happening.

thanks

Aucun commentaire:

Enregistrer un commentaire