samedi 5 octobre 2019

Express-session not persisting in Jest tests

I have an express api endpoint that uses req.session.username to check if a user is logged in. Everything works as expected when I manually test it. However when I use Jest with supertest to do it, it always says that req.session.username is undefined after it is is initially set via logging in. What can I do?

Aucun commentaire:

Enregistrer un commentaire