File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1
1
## is
2
2
3
+ ::: warning Deprecation warning
4
+ Using ` is ` to assert that DOM node or ` vm ` matches selector is deprecated and will be removed.
5
+
6
+ Consider a custom matcher such as those provided in [ jest-dom] ( https://github.com/testing-library/jest-dom#custom-matchers ) .
7
+ or for DOM element type assertion use native [ ` Element.tagName ` ] ( https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName ) instead.
8
+
9
+ To keep these tests, a valid replacement for:
10
+
11
+ - ` is('DOM_SELECTOR') ` is a assertion of ` wrapper.element.tagName ` .
12
+ - ` is('ATTR_NAME') ` is a truthy assertion of ` wrapper.attributes('ATTR_NAME') ` .
13
+ - ` is('CLASS_NAME') ` is a truthy assertion of ` wrapper.classes('CLASS_NAME') ` .
14
+
15
+ When using with findComponent, access the DOM element with ` findComponent(Comp).element `
16
+ :::
17
+
3
18
Assert ` Wrapper ` DOM node or ` vm ` matches [ selector] ( ../selectors.md ) .
4
19
5
20
- ** Arguments:**
You can’t perform that action at this time.
0 commit comments