Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Test cookie based authentication in server #7

Open
takethefake opened this issue Jun 13, 2019 · 0 comments
Open

Test cookie based authentication in server #7

takethefake opened this issue Jun 13, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@takethefake
Copy link

Currently, the cookie-based authentication isn't tested inside the server tests, because we don't have a real express.Response which contains the res.cookie function.

The current behavior to keep the tests running is because we added jest.fn in res.cookie in the GraphQLProvider- Context. We need a possibility to add jest.fn to res.cookie during the initialization of the test. Afterwards, we can check if res.cookie was called with the desired parameters.

@takethefake takethefake added the good first issue Good for newcomers label Jun 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant