Super test, test secure REST API
I am writing integration test for a REST API protected by a jwt . One API operation POST /user/token is returning a jwt given a username and a password and this token is then used for a list of operations such as: GET /user/:id Where the route is using jwt({secret: secret.secretToken}) , so the token is included into the http header Authorization . When testing with super test, I can have nested testing but I want to first get the token, then use this token for other operation testing. POST /user/token => 12345 GET /user/:id, `Authorization Bearer 12345` GET /user/:foo, `Authorization Bearer