Open
Description
Subject of the issue
The following code:
const wrapper = mount({
template: '<div class="existent"></div>'
});
console.log(wrapper.find(".existent") instanceof DOMWrapper);
console.log(wrapper.find(".non-existent") instanceof DOMWrapper);
returns "true false".
But according to function declaration:
abstract find(selector: string): DOMWrapper<Element>;
it should return "true true".
The problem is that inside JEST matcher I can't easily check that value is wrapper.
Steps to reproduce
See the first code snippet above.
Expected behaviour
Find function should return DOMWrapper as declared.
OR
It should return "DOMWrapper | NotFoundWrapper" and it should be declared accordingly.
Actual behaviour
Function does not return what is declared.
Possible Solution
- Return DomWrapper for non-existent element
- Return DOMWrapper | NotFoundWrapper