add info about ErrorWrapper object
See original GitHub issueWhat problem does this feature solve?
As I can see find
method returns Wrapper
object if element found or ErrorWrapper
object if not element found. Both are implement BaseWrapper
.
I think it will be good to add this information in order to do more clear info about returning type of find
.
Also, may be create page for ErrorWrapper
object.
What does the proposed API look like?
Returns: {Wrapper}
to something like
Returns: {Wrapper | ErrorWrapper}
...some notes when ErrorWrapper returned and example...
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
How to Add Extra Information to Errors in Go - DigitalOcean
In Go 1.13, new features were added to make it easier to add extra information to errors: fmt.Errorf, errors.Is , and errors.
Read more >API Reference - Vue Test Utils
Creates a Wrapper that contains the mounted and rendered Vue component to test. Signature: interface MountingOptions<Props, Data = {}> ...
Read more >Python pydantic.error_wrappers.ErrorWrapper() Examples
This page shows Python examples of pydantic.error_wrappers.ErrorWrapper.
Read more >vue test return error wrapper.findComponent is not a function
I had the same issue with @vue/test-utils from 1.0.0-beta.29, but you can use wrapper.find() to select by ref. example: wrapper.find({ ref: ...
Read more >Handling errors — iOS App Dev Tutorials - Apple Developer
Add an error wrapper structure · Create an error view · Report errors · Simulate data corruption · Check Your Understanding · Drawing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Testing this with
@vue/test-utils@1.0.3
andexists()
actually returnsfalse
for anErrorWrapper
componentThis can also be found in the sourcecode: https://github.com/vuejs/vue-test-utils/blob/4b0c5c94fb29885bb65e26fea64b8ca64960e301/packages/test-utils/src/error-wrapper.js#L74
I prefer naming methods like:
find(x)
that will search forx
. It may not find anything, and it is totally expected.get(x)
that will getx
. It will always return value ofx
or it will throw exception stating thatx
could not be found.So I am missing the
get
method here.See #1298