File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,15 @@ const valid = [
8888 `expect(screen.getAllByText("foo")).toHaveLength(getLength())` ,
8989 `expect(screen.getAllByText("foo")).toBe(foo)` ,
9090 `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` ,
91100] ;
92101const invalid = [
93102 invalidCase (
Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ export const create = (context) => {
7171 negatedMatcher,
7272 expect,
7373 } ) {
74+ if ( matcherNode . parent . parent . type !== "CallExpression" ) {
75+ return ;
76+ }
77+
7478 // only report on dom nodes which we can resolve to RTL queries.
7579 if ( ! queryNode || ( ! queryNode . name && ! queryNode . property ) ) return ;
7680
You can’t perform that action at this time.
0 commit comments