This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
How to I get a valid session from a jest script? #2396
Labels
question
Ask how to do something or how something works
Question 💬
I was trying to test my APIs with Jest, wondering if it's possible to sign in and get a valid session from a jest script.
I hoping if it can be possible without sign in method. because if i use
@jest-environment jsdom
I can run the sign in method but I don't get to pass the absolute URL.for example the auth url is
https://localhost:3000/auth
but as I'm using node fetch. (because the normal fetch is not available) the URL becomes relative in the signIn method. that is it becomes
/auth
and i get an error. let me know if there can be a better way to get a valid session from a server environment..How to reproduce ☕️
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered: