You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, im trying to call passport.authenticate with the mockstrategy in a unit test so that I will be able to call a function that currently checks for req.user (normally it would get it through a cookie).
I have used:
const passportMock = createMockPassport(app);
setupSerializeAndDeserialize(passportMock, null, null);
connectPassport(app, passportMock);
But I don't really know what to call on my test so that the authentification of a custom user object will be succesful and req.login(user) is called.
Thank you in advanced!
The text was updated successfully, but these errors were encountered:
Hello, im trying to call passport.authenticate with the mockstrategy in a unit test so that I will be able to call a function that currently checks for req.user (normally it would get it through a cookie).
I have used:
const passportMock = createMockPassport(app);
setupSerializeAndDeserialize(passportMock, null, null);
connectPassport(app, passportMock);
But I don't really know what to call on my test so that the authentification of a custom user object will be succesful and req.login(user) is called.
Thank you in advanced!
The text was updated successfully, but these errors were encountered: