-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
login/logout Test helpers not working in other modules #1126
Comments
To be able to use authenticated tests in the meantime, I extracted login and logout helpers to a new module. Now my tests are quite unpredictable. To reproduce, take a fresh clone of the kits stable branch and
Now run the tests from the kits root directory with
|
@Theweird Have you tried to run jest with |
That worked for the errors of the second post. Thank you. What do you think about moving login and logout test helpers to testing-server-ts? |
@Theweird I don't think they belong to |
Just added pull request #1129 The errors mentioned in the issues first post occour, when importing LOGIN and LOGOUT mutations directly from user-client-react and authentication-client-react but not when importing from the subpath inside these modules. So I imported the mutations directly from the files. I also tried to embed a basic login mutation and the logout mutation with graphql-tag directly into the helpers file. Works, too. |
Describe the bug
I'm updating a current project to the latest stable of the kit, migrating from packages to modules structure.
Before, I just imported the user modules login/logout helper to use it for authenticated tests in other modules.
Now, importing them into anohter modules test file and trying to access the helpers, I get an error
Cannot find module './containers/Auth' from 'index.jsx'
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
If just passed to console.log, I'd expect to see an output of an object, having a login and a logout function.
If calling one of these functions I'd expect to have an authenticated or anonymous user for running further tests.
Actual console output
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: