diff --git a/tests/lib/rules/no-node-access.test.ts b/tests/lib/rules/no-node-access.test.ts index 717fdcac..e15bc727 100644 --- a/tests/lib/rules/no-node-access.test.ts +++ b/tests/lib/rules/no-node-access.test.ts @@ -138,6 +138,25 @@ ruleTester.run(RULE_NAME, rule, { expect(container.firstChild).toMatchSnapshot() `, }, + { + // Example from discussions in issue #386 + code: ` + import { render } from '@testing-library/react'; + + function Wrapper({ children }) { + // this should NOT be reported + if (children) { + // ... + } + + // this should NOT be reported + return