Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for doesSessionExist returning false when backend is not reachable #67

Open
dulowski-marek opened this issue Jul 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@dulowski-marek
Copy link
Contributor

Problem

Currently (supertokens/supertokens-auth-react@1c9f5b3) supertokens-auth-react relies on doesSessionExist returning false in SessionAuth when backend is not reachable.

Goal

Preserve the bevaiour to keep the developer experience good. It should still render the UI when backend is unreachable, because we instruct the user to setup the frontend first.

Solution

Add a unit test:

  1. Given that backend is not reachable
  2. When I call doesSessionExist
  3. Then it should return false and NOT throw an error

Note: doesSessionExist calls refresh session function underneath, so make sure to test for this case as well.

Prerequisites

This will require unit tests to be set up.

@dulowski-marek dulowski-marek added the enhancement New feature or request label Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant