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

Support reporting unhandledrejection errors. #184

Open
johnjbarton opened this issue Jun 28, 2017 · 2 comments
Open

Support reporting unhandledrejection errors. #184

johnjbarton opened this issue Jun 28, 2017 · 2 comments
Labels

Comments

@johnjbarton
Copy link
Contributor

New feature, so far only chrome perhaps:
https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onunhandledrejection

I would send a PR for this if encouraged.

@maksimr
Copy link
Contributor

maksimr commented Aug 22, 2017

@johnjbarton why would you think it should be implemented in the karma-jasmine adapter?

Thanks

@johnjbarton
Copy link
Contributor Author

The unhandled rejections are a kind of global test error message. (Of course like, all error messages, some may be harmless to the test objective). Generally test error messages are reported via karma reporters. Therefore my goal is to emit the unhandled rejection error messages in the reporter.

Based on the system architecture, karma-jasmine is the component that routes information to the reporter. The framework adapters like karma-jasmine call karma-runner's in-browser functions with data that karma-runner ferries to the server and emits via its reporter API.

So it seemed reasonable to me to us the karma-jasmine adapter to report the unhandled rejections.

I suppose this could be built into the karma-runner context as it is not jasmine specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants