-
Notifications
You must be signed in to change notification settings - Fork 7
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
Figure out how to test for errors and warnings in the browser console and build test(s) #74
Comments
We could consider doing this in Playwright (e.g. microsoft/playwright#27277) or with Vitest (e.g. |
I think this is the tooltip code that will change short term. |
Options with vitest:
|
Option with Playwright is to define a Two challenges with testing copy/paste with Playwright (because it's a good way to trigger a console error through the tooltip):
|
So far I'm preferring the vitest option over the Playwright one:
|
Playwright output - calling
followed by 34 lines of stacktrace. Using the solution in the Playwright issue comment, where you override the Vitest output - using vitest-fail-on-console:
followed by 18 lines of stacktrace. |
Example currently in application: "Warning: Encountered two children with the same key, proxyCertificates. "
branch to explore solutions:
74-test-for-console-errors-and-warnings
Conclusion as implemented in linked PR: use vitest-fail-on-console.
No need to implement any tests. All vitest tests will now fail when there are console errors or warnings. Pasting non-numbers twice in the Voters and Voters page does result in an error, but improving that functionality and its tests are for issue #73.
The text was updated successfully, but these errors were encountered: