# no-focused-test

Disallow focused tests and suites

A focused test or suite prevents unrelated tests from running and can conceal regressions.
Instead, you MUST remove the focus modifier before committing the test.

- Category: suspicious
- Level: error
- Fix: automatic
- Scope: module

## Reported

```ds title="main.ds"
import { test } from "destack:test";

test.only("adds values", () => {
    // ...
});
```

## Accepted

```ds title="main.ds"
import { test } from "destack:test";

test("adds values", () => {
    // ...
});
```

## Prior art

- [eslint-plugin-jest · no-focused-tests](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-focused-tests.md)
- [eslint-plugin-playwright · no-focused-test](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/docs/rules/no-focused-test.md)

[language/linter/src/rules/suspicious/no_focused_test.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/suspicious/no_focused_test.rs#L8)
