You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{byRole}from'testing-library-selector';constui={input: byRole('textbox');};test('test',()=>{render(<input/>);expect(ui.input.get()).toHaveAttribute('disabled');// <--- no errors here });
Is it possible to use these rules when screen.getBy... methods are not used directly as an element?
The text was updated successfully, but these errors were encountered:
No, I don't see a good way we could support this given you're importing from testing-library-selector, the import is ByRole (rather than getByRole), and the argument to expect is ui.input.get() which is very generic - it might be more possible if we TypeScript based, but then it would require everyone to use TypeScript.
Yes, I thought this is impossible. So, we'll have to exclude this plugin from the project then.
Also, I don't think that Typescript can help somehow here...
Anyway, thank you for the response @G-Rath.
The following code doesn't warn any errors:
Is it possible to use these rules when
screen.getBy...
methods are not used directly as an element?The text was updated successfully, but these errors were encountered: