Skip to content

Commit

Permalink
refactor(no-container): update error message
Browse files Browse the repository at this point in the history
and incorrect use case
  • Loading branch information
thebinaryfelix committed Jun 20, 2020
1 parent e63968f commit 5aa3a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/rules/no-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const button = alias.querySelector('.btn-primary');

```js
const view = render(<Example />);
const button = view.container.querySelector('.btn-primary');
const button = view.container.getElementsByClassName('.btn-primary');
```

Examples of **correct** code for this rule:
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default ESLintUtils.RuleCreator(getDocsUrl)({
},
messages: {
noContainer:
'Avoid using container to query for elements. Prefer using query methods from Testing Library, such as "getByRole()"',
'Avoid using container methods. Prefer using the methods from Testing Library, such as "getByRole()"',
},
fixable: null,
schema: [
Expand Down

0 comments on commit 5aa3a80

Please sign in to comment.