1

I've started integrating jasmine-node for testing some REST API, but I'm having hard time trying to find a way to specify the _spec files execution order.

Since all the API requires a Bearer authentication header, I have to make sure the test included in the login_spec.js will be the first executed, so that I can save the authentication token and reuse it in the API calls which follow to perform all the remaining tests.

Does someone have any idea on how to achieve this?

1 Answers1

0

In my opinion you must get the Bearer authentication via the authentication api (the same used by your application on the login page).

If you don't have access to that api you will have to create a E2E test to login in the application, what would make your tests get slower.

flaviomeira10
  • 566
  • 11
  • 24