# Eslint Plugin Playwright > Ensure that there is at least one`expect`call made in a test. ## Pages - [Enforce assertion to be made in a test body (`expect-expect`)](rules-expect-expect.md): Ensure that there is at least one`expect`call made in a test. - [Enforces a maximum number assertion calls in a test body (`max-expects`)](rules-max-expects.md): As more assertions are made, there is a possible tendency for the test to be - [Enforces a maximum depth to nested describe calls (`max-nested-describe`)](rules-max-nested-describe.md): While it's useful to be able to group your tests together within the same file - [Enforce Playwright APIs to be awaited (`missing-playwright-await`)](rules-missing-playwright-await.md): Identify false positives when async Playwright APIs are not properly awaited. - [Disallow commented out tests (`no-commented-out-tests`)](rules-no-commented-out-tests.md): This rule raises a warning about commented out tests. It's similar to - [Disallow calling `expect` conditionally (`no-conditional-expect`)](rules-no-conditional-expect.md): This rule prevents the use of`expect`in conditional blocks, such as`if`s & - [Disallow conditional logic in tests (`no-conditional-in-test`)](rules-no-conditional-in-test.md): Conditional logic in tests is usually an indication that a test is attempting to - [Disallow duplicate setup and teardown hooks (`no-duplicate-hooks`)](rules-no-duplicate-hooks.md): A`describe`block should not contain duplicate hooks. - [No Element Handle](rules-no-element-handle.md): Disallow the creation of element handles with`page.$`or`page.$$`. - [Disallow usage of `page.$eval` and `page.$$eval` (`no-eval`)](rules-no-eval.md): Examples of **incorrect** code for this rule: - [Disallow usage of `.only` annotation (`no-focused-test`)](rules-no-focused-test.md): Examples of **incorrect** code for this rule: - [Disallow usage of the `{ force: true }` option (`no-force-option`)](rules-no-force-option.md): Examples of **incorrect** code for this rule: - [No Get By Title](rules-no-get-by-title.md): The HTML`title`attribute does not provide a fully accessible tooltip for - [Disallow setup and teardown hooks (`no-hooks`)](rules-no-hooks.md): Playwright provides global functions for setup and teardown tasks, which are - [Disallow nested `test.step()` methods (`no-nested-step`)](rules-no-nested-step.md): Nesting`test.step()`methods can make your tests difficult to read. - [Disallow usage of the `networkidle` option (`no-networkidle`)](rules-no-networkidle.md): Using`networkidle`is discouraged in favor of using - [Disallow usage of `nth` methods (`no-nth-methods`)](rules-no-nth-methods.md): This rule prevents the usage of`nth`methods (`first()`,`last()`, and - [No Page Pause](rules-no-page-pause.md): Prevent usage of`page.pause()`. - [No Raw Locators](rules-no-raw-locators.md): Prefer using user-facing locators over raw locators to make tests more robust. - [Disallow specific matchers & modifiers (`no-restricted-matchers`)](rules-no-restricted-matchers.md): This rule bans specific matchers & modifiers from being used, and can suggest - [Disallow usage of the `.skip` annotation (`no-skipped-test`)](rules-no-skipped-test.md): Examples of **incorrect** code for this rule: - [Disallow usage of the `.slow` annotation (`no-slowed-test`)](rules-no-slowed-test.md): Examples of **incorrect** code for this rule: - [Disallow using `expect` outside of `test` blocks (`no-standalone-expect`)](rules-no-standalone-expect.md): Prevents`expect`statements outside of a`test`block. An`expect`within a - [No Unsafe References](rules-no-unsafe-references.md): This rule prevents common mistakes when using`page.evaluate()`or - [Disallow usage of page locators that are not used (`no-unused-locators`)](rules-no-unused-locators.md): Using locators without performing any actions or assertions on them can lead to - [Disallow unnecessary `await`s for Playwright methods (`no-useless-await`)](rules-no-useless-await.md): Some Playwright methods are frequently, yet incorrectly, awaited when the await - [Disallow usage of `not` matchers when a specific matcher exists (`no-useless-not`)](rules-no-useless-not.md): Several Playwright matchers are complimentary such as`toBeVisible`/`toBeHidden` - [Disallow usage of `page.waitForNavigation` (`no-wait-for-navigation`)](rules-no-wait-for-navigation.md): Example of **incorrect** code for this rule: - [Disallow usage of `page.waitForSelector` (`no-wait-for-selector`)](rules-no-wait-for-selector.md): Example of **incorrect** code for this rule: - [Disallow usage of `page.waitForTimeout` (`no-wait-for-timeout`)](rules-no-wait-for-timeout.md): Example of **incorrect** code for this rule: - [Suggest using the built-in comparison matchers (`prefer-comparison-matcher`)](rules-prefer-comparison-matcher.md): Playwright has a number of built-in matchers for comparing numbers, which allow - [Suggest using the built-in equality matchers (`prefer-equality-matcher`)](rules-prefer-equality-matcher.md): Playwright has built-in matchers for expecting equality, which allow for more - [Prefer having hooks in a consistent order (`prefer-hooks-in-order`)](rules-prefer-hooks-in-order.md): While hooks can be setup in any order, they're always called by`playwright`in - [Suggest having hooks before any test cases (`prefer-hooks-on-top`)](rules-prefer-hooks-on-top.md): While hooks can be setup anywhere in a test file, they are always called in a - [Suggest using `page.locator()` (`prefer-locator`)](rules-prefer-locator.md): Suggest using locators and their associated methods instead of page methods for - [Enforce lowercase test names (`prefer-lowercase-title`)](rules-prefer-lowercase-title.md): Enforce`test`and`test.describe`to have descriptions that begin with a - [Suggest using native Playwright locators (`prefer-native-locators`)](rules-prefer-native-locators.md): Playwright has built-in locators for common query selectors such as finding - [Suggest using `toStrictEqual()` (`prefer-strict-equal`)](rules-prefer-strict-equal.md): `toStrictEqual`not only checks that two objects contain the same data but also - [Suggest using `toBe()` for primitive literals (`prefer-to-be`)](rules-prefer-to-be.md): When asserting against primitive literals such as numbers and strings, the - [Suggest using `toContain()` (`prefer-to-contain`)](rules-prefer-to-contain.md): In order to have a better failure message,`toContain()`should be used upon - [Suggest using `toHaveCount()` (`prefer-to-have-count`)](rules-prefer-to-have-count.md): In order to have a better failure message,`toHaveCount()`should be used upon - [Suggest using `toHaveLength()` (`prefer-to-have-length`)](rules-prefer-to-have-length.md): In order to have a better failure message,`toHaveLength()`should be used upon - [Prefer web first assertions (`prefer-web-first-assertions`)](rules-prefer-web-first-assertions.md): Playwright supports many web first assertions to assert properties or conditions - [Require setup and teardown code to be within a hook (`require-hook`)](rules-require-hook.md): It's common when writing tests to need to perform setup work that has to happen - [Require soft assertions (`require-soft-assertions`)](rules-require-soft-assertions.md): Some find it easier to write longer test that perform more assertions per test. - [Require a message for `toThrow()` (`require-to-throw-message`)](rules-require-to-throw-message.md): `toThrow()`(and its alias`toThrowError()`) is used to check if an error is - [Require test cases and hooks to be inside a `test.describe` block (`require-top-level-describe`)](rules-require-top-level-describe.md): Playwright allows you to organise your test files the way you want it. However, - [Enforce valid `describe()` callback (`valid-describe-callback`)](rules-valid-describe-callback.md): Using an improper`describe()`callback function can lead to unexpected test - [Require promises that have expectations in their chain to be valid (`valid-expect-in-promise`)](rules-valid-expect-in-promise.md): Ensure promises that include expectations are returned or awaited. - [Enforce valid `expect()` usage (`valid-expect`)](rules-valid-expect.md): Ensure`expect()`is called with a matcher. - [Valid Test Tags](rules-valid-test-tags.md): This rule ensures that test tags in Playwright test files follow the correct - [Enforce valid titles (`valid-title`)](rules-valid-title.md): Checks that the title of test blocks are valid by ensuring that titles are: