File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,15 @@ const valid = [
88
88
`expect(screen.getAllByText("foo")).toHaveLength(getLength())` ,
89
89
`expect(screen.getAllByText("foo")).toBe(foo)` ,
90
90
`expect(screen.getAllByText("foo")).toEqual(foo)` ,
91
+ `
92
+ const element = getByText('value')
93
+ expect(element).toBeTruthy` ,
94
+ `
95
+ const element = getByText('value')
96
+ expect(element).toBe.truthy` ,
97
+ `
98
+ const element = getByText('value')
99
+ expect(element).toBeInTheDocument` ,
91
100
] ;
92
101
const invalid = [
93
102
invalidCase (
Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ export const create = (context) => {
71
71
negatedMatcher,
72
72
expect,
73
73
} ) {
74
+ if ( matcherNode . parent . parent . type !== "CallExpression" ) {
75
+ return ;
76
+ }
77
+
74
78
// only report on dom nodes which we can resolve to RTL queries.
75
79
if ( ! queryNode || ( ! queryNode . name && ! queryNode . property ) ) return ;
76
80
You can’t perform that action at this time.
0 commit comments