question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add info about ErrorWrapper object

See original GitHub issue

What 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:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Robin-Hoodiecommented, Nov 6, 2020

Testing this with @vue/test-utils@1.0.3 and exists() actually returns false for an ErrorWrapper component

This can also be found in the sourcecode: https://github.com/vuejs/vue-test-utils/blob/4b0c5c94fb29885bb65e26fea64b8ca64960e301/packages/test-utils/src/error-wrapper.js#L74

1reaction
tomasbjerrecommented, Aug 30, 2019

I prefer naming methods like:

  • find(x) that will search for x. It may not find anything, and it is totally expected.
  • get(x) that will get x. It will always return value of x or it will throw exception stating that x could not be found.

So I am missing the get method here.

See #1298

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found