Skip to content

Commit a757b7e

Browse files
committed
test: add test
1 parent 7de4ee1 commit a757b7e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/lib/rules/no-node-access.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,22 @@ ruleTester.run(RULE_NAME, rule, {
266266
const result = render(<MyComponent />)
267267
await result.user.click(screen.getByRole("button"))
268268
});
269+
`,
270+
},
271+
{
272+
settings: {
273+
'testing-library/utils-module': 'TestUtils',
274+
'testing-library/custom-renders': ['renderComponent'],
275+
},
276+
code: `
277+
// case: custom module set but not imported using ${testingFramework} (aggressive reporting limited)
278+
import { screen, renderComponent } from './TestUtils';
279+
import MyComponent from './MyComponent'
280+
281+
test('...', async () => {
282+
const result = renderComponent(<MyComponent />)
283+
await result.user.click(screen.getByRole("button"))
284+
});
269285
`,
270286
},
271287
]

0 commit comments

Comments
 (0)