Hey guys, which functions would i have to mock out...
# support-questions-legacy
b
Hey guys, which functions would i have to mock out (via jest) to write an integration test for a user signing in -> to unverified email. I use the SessionAuth component, so some pointers would be great. (This component seems to be the one handling the redirection, but unsure of which functions to mock out from super tokens to make the component believe i'm an unverified logged in user)
r
hey @bladerpc
@porcellus can help when he is available
p
hi
that's not as easy as it should be :/ check here: https://github.com/supertokens/supertokens-auth-react/blob/master/test/unit/recipe/session/sessionAuth.test.tsx it's not pretty, but it works. It requires you to import stuff from deep inside the package (
../../../../lib/ts/**
->
supertokens-node/lib/build/**
), but it should work.
28 Views