-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
CI: event-handler-dynamic fails with exceptions #4087
Comments
@tanhauhau, mind taking a look at this? The offending file is here: event-handler-dynamic |
It's passing for me locally on the latest master, and it's passing in github's CI - https://github.com/sveltejs/svelte/commit/0a6310f7a39b76bb884251cf3cc385c9298645db/checks?check_suite_id=351586083 |
@Conduitry, I pulled that exception from the latest master... the problem is that it is passing. False negatives are crazy bad for regression tests. |
Performing the test steps manually in Chrome dev mode gives the same result: Here's a REPL: |
I found the issue... The test wants to see that clicking the button before assigning the handler does nothing. |
i don't understand your statement: let [hand1, hand2, btn] = div.querySelectorAll('button') i have searched MDN, but there are no api like this. |
Closing this in favor of the root cause specified in #4090. |
I've reopened this issue as a placeholder for the root cause of why exceptions in Svelte runtime don't fail tests. The actually answer lies in JSDOM's approximation of how real exceptions are handled by the browser. In the specific test mentioned here, the event handler installed by Svelte has a bug where it doesn't check the validity of the callback before trying to execute it. Since the runtime is being triggered by The simple solution is to install an With the handler installed, you get a much clearer (and failed) test output:
|
Describe the bug
CI logs show
event-handler-dynamic
failing to run with exceptions thrown after triggering button click events.Logs
To Reproduce
Take a look at the CI logs
Expected behavior
The test case should run without exceptions or the CI check should fail.
Severity
Moderate.
If more tests fail in this manner, we'll be missing possible regressions because we think the CI check is OK when its not.
The text was updated successfully, but these errors were encountered: