Deprecation warning
Using get
to search for a Component is deprecated and will be removed. Use getComponent
instead.
Works just like find but will throw an error if nothing matching the given selector is found. You should use find
when searching for an element that may not exist. You should use this method when getting an element that should exist and it will provide a nice error message if that is not the case.
import { mount } from '@vue/test-utils'
const wrapper = mount(Foo)
// similar to `wrapper.find`.
// `get` will throw an error if an element is not found. `find` will do nothing.
expect(wrapper.get('.does-exist'))
expect(() => wrapper.get('.does-not-exist'))
.to.throw()
.with.property(
'message',
'Unable to find .does-not-exist within: <div>the actual DOM here...</div>'
)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4