I\'m trying to test authenticated routes in Mocha but the user created in before or beforeEach hooks does not persist.
before
beforeEach
In test.js
test.js
You need to use Authorization header with the Bearer authentication scheme:
.set('Authorization', 'Bearer ' + jwtToken)