-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix test warning on test library wrap in act #556
Conversation
Visit the preview URL for this PR (updated for commit cb48c50): https://blui-react-login--pr556-fix-blui-5380-test-w-ncsmiw8a.web.app (expires Fri, 08 Mar 2024 18:05:30 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 1e9064d2e35ed37fe01e053587ea5f209719a043 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix lint and prettier.
We may need to add husky in this repo.
yes I know it has lint warnings, did you read the Any specific feedback you are looking for section above |
Fixes # #390.
Changes proposed in this Pull Request:
Screenshots / Screen Recording (if applicable)
To Test:
Any specific feedback you are looking for?
I created a new test file to single out 1 test that has the updated act in the test. The test passes and has no console warning. I'm out of ideas on how to remedy the lint warnings in this file configured in different ways other than doing some eslint-ignores everywhere...
warning: Async arrow function has no 'await' expression
If you add the await then it complains about that
warning: Unexpected
await
of a non-Promise (non-"Thenable") valueIf you remove the async function and the await and only wrap the fireEvent with act()
warning: An update to RegistrationWorkflow inside a test was not wrapped in act(...)
I update the temporary test file with void ((): void => on line 54. If you would want to see the combination of lint warnings please remove line 54
I'm uncertain if the renderer render if causing all this.
Unrelated to this PR, the base component tests are setup the same with the renderer and all those tests throw warnings on i18Next.
react-i18next:: You will need to pass in an i18next instance by using initReactI18next