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
Hi, we're creating tests for one of our web applications, and there doesn't seem to be an easy way to mock out Sessions where SessionAuth HoC is respected.
While we can mock out the auth endpoints, I'm not so sure how to mock out the actual session response. If we cannot mock out the actual session, then the SessionAuth HoC will block us from testing other components. Plus, we'd like to actually test Auth flows
supertokens/supertokens-core#115 recommends spinning up a local supertokenscore with inmemory db, however, this is really cumberstone and complex for our use case.
The text was updated successfully, but these errors were encountered:
What you can do is to override the session recipe functions on the frontend like doesSessionExist or getAccessTokenPayloadSecurely etc to return mocked information if it's testing env. This should solve your issue
Hi, we're creating tests for one of our web applications, and there doesn't seem to be an easy way to mock out Sessions where
SessionAuth
HoC is respected.While we can mock out the auth endpoints, I'm not so sure how to mock out the actual session response. If we cannot mock out the actual session, then the
SessionAuth
HoC will block us from testing other components. Plus, we'd like to actually test Auth flowssupertokens/supertokens-core#115 recommends spinning up a local supertokenscore with inmemory db, however, this is really cumberstone and complex for our use case.
The text was updated successfully, but these errors were encountered: