Skip to content

fix: update ESLint plugin documentation link in warning message #1782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/queries/__tests__/find-by.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ test('findByTestId detects screen being detached', async () => {
Screen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.

We recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:
https://callstack.github.io/react-native-testing-library/docs/getting-started#eslint-plugin"
https://callstack.github.io/react-native-testing-library/docs/start/quick-start#eslint-plugin"
`);
});
2 changes: 1 addition & 1 deletion src/queries/make-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
}

if (screen.isDetached) {
return `${message}\n\nScreen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.\n\nWe recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:\nhttps://callstack.github.io/react-native-testing-library/docs/getting-started#eslint-plugin`;
return `${message}\n\nScreen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited.\n\nWe recommend enabling "eslint-plugin-testing-library" to catch these issues at build time:\nhttps://callstack.github.io/react-native-testing-library/docs/start/quick-start#eslint-plugin`;

Check warning on line 91 in src/queries/make-queries.ts

View check run for this annotation

Codecov / codecov/patch

src/queries/make-queries.ts#L91

Added line #L91 was not covered by tests
}

const json = screen.toJSON();
Expand Down