Skip to content
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

No longer bubble 'error' events from a-asset-items as these interfere with Karma #5548

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

mrxz
Copy link
Contributor

@mrxz mrxz commented Jun 27, 2024

Description:
I noticed that not all unit tests are being executed. Turns out that emitting error events causes Karma to stop executing further tests. Interestingly enough this does not seem to be tied to the error event handler in __init.test.js. This PR ensure that the error event emitted by <a-asset-item> doesn't bubble, effectively resolving the issue.

Ideally we should avoid using the error event name, but I figured that is a bigger breaking change than changing it to not bubble.

Before: ✔ 1771 tests completed / ℹ 12 tests skipped
After: ✔ 2475 tests completed / ℹ 16 tests skipped
Note: Above results are obtained by running npm run test, which counts test double between FF and Chrome

Changes proposed:

  • No longer bubble error events from a-asset-items

@dmarcos
Copy link
Member

dmarcos commented Jul 1, 2024

Awesome catch! Thanks so much!

@dmarcos dmarcos merged commit ca7b02d into aframevr:master Jul 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants