-
Notifications
You must be signed in to change notification settings - Fork 667
Expected Behavior of Error Propogation #147
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
Comments
found a way to test the error, does not seem ideal but would work
|
Had an additional thought on this. Could we take advantage of the errorHandler?
|
Hi @Austio. You're right, thrown errors should make a test fail. Are you able to make a PR to improve error propagation? |
… mount function resolves vuejs#147
@eddyerburgh #154 Proof of concept for idea to handle. Please let me know what you think and will finish out if this is good direction to go. |
Looks perfect Austio, I've left some feedback on style issues, ready to merge when they're fixed |
) * Propogate thrown errors by configuring error handler and attaching in mount function resolves #147 * set errorHandler to be a default export and set Vue.config.errorHandler = errorHandler in mount * Add test for create-local-vue error handler being defined and configure that in create local vue
Hey sorry for the multiple issues but saw this while driving out a test.
This may be more of a discussion, but what is the intended behavior of error propogation in vue-test-utils? I created an example below but what i'm seeing in production is a mounted function in throwing an error due to some bad assumptions and that causes a white screen. In my test when i reproduce by throwing an error in the mounted function I see the error in the console but I am not able to access it in vue-test-utils, i've tried numerous 'mocha' like ways to get the error to surface but was unable to.
Any thoughts on how to get access to thrown errors?
Here is a repo with reproduction.
https://github.com/Austio/vue-test-utils-mocha-webpack-example/pull/1/files
The text was updated successfully, but these errors were encountered: