-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
feat: add a prop named error
to the ErrorComponent when load async …
#10037
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
base: dev
Are you sure you want to change the base?
Conversation
…component rejected(vuejs#10027)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also the case where the timeout is exceeded which hasn't been handled. I'm not sure of what kind of error it should throw, maybe an new Error('timeout')
but it would be nice to gather some feedback on this first
}) | ||
|
||
it('with error component', done => { | ||
it('with error component + a prop named error', done => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to keep the old test and add a new one that shows the error
component: new Promise((resolve, reject) => { | ||
setTimeout(() => { | ||
reject() | ||
reject('error') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors are usually new Error('message')
, so better test it that way so it is closer to real scenarios
…t when load async component rejected (vuejs#10027)
… when load async component timeout (vuejs#10027)
Thank for your review. I did something for your suggestion. |
: factory.resolved | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested you include a comment, preceded by the pull request number.
…component rejected(#10027)
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
dev
branch for v2.x (or to a previous version branch), not themaster
branchfix #xxx[,#xxx]
, where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
issues number: 10027