There are 27 linting rules available in eslint-plugin-testing-library, here’s a summary of the linting rules picked for our web register

To reduce flaky tests (that passes when they should)

  1. Disallow the use of the global RegExp flag (/g) in queries (testing-library/no-global-regexp-flag-in-query)

To create effective tests (that fails when they should)

  1. Enforce promises from async queries to be handled (testing-library/await-async-query)
  2. Enforce promises from async utils to be handled (testing-library/await-async-utils)

To create more helpful error messages

To best mimic user interaction

  1. Disallow container and its too-powerful methods like querySelector (testing-library/no-container)

To simplify tests

  1. Prefer findBy over waitFor + getBy

To use modern approach

  1. Use waitFor instead of wait -> deprecation
  2. use view, utils, or destructing for render results, instead of wrapper