> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# no-focused-tests

[Added in v0.8.1](https://github.com/web-infra-dev/rslint/releases/tag/v0.8.1)
## Configuration

| Preset                             | Configured Value |
| ---------------------------------- | ---------------- |
| ✅ rstestPlugin.configs.all         | `"warn"`         |
| ✅ rstestPlugin.configs.recommended | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, rstestPlugin } from '@rslint/core';

export default defineConfig([
  rstestPlugin.configs.recommended,
  {
    rules: {
      'rstest/no-focused-tests': 'error',
    },
  },
]);
```

## Rule Details

Disallows focused tests and suites. Leaving `.only` in committed code prevents the rest of the suite from running.

The rule recognizes `.only` on Rstest tests and suites, including aliases, parameterized registrations, fixtures, and Playwright integrations.

## Incorrect

```ts
describe.only('user service', () => {
  test('creates a user', () => {});
});
```

## Correct

```ts
describe('user service', () => {
  test('creates a user', () => {});
});
```

## Suggestions

Offers a suggestion to remove `.only` when the focused modifier is unambiguous.
