> 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.

# padding-around-test-blocks

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

| Preset                   | Configured Value |
| ------------------------ | ---------------- |
| ✅ jestPlugin.configs.all | `"error"`        |


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

export default defineConfig([
  jestPlugin.configs.recommended,
  {
    rules: {
      'jest/padding-around-test-blocks': 'error',
    },
  },
]);
```

## Rule Details

Require a blank line before and after Jest test statements, including `test`, `it`, `fit`, `xit`, and `xtest`. No trailing blank line is required when the test is the last statement in its scope.

## Incorrect

```js
const account = createAccount();
test('saves the account', saveAccount);
it('loads the account', loadAccount);
```

## Correct

```js
const account = createAccount();

test('saves the account', saveAccount);

it('loads the account', loadAccount);
```

## Autofix

The rule inserts missing blank lines before and after test statements.

## Original Documentation

- [eslint-plugin-jest: padding-around-test-blocks](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/docs/rules/padding-around-test-blocks.md)
- [Source code](https://github.com/jest-community/eslint-plugin-jest/blob/v29.16.0/src/rules/padding-around-test-blocks.ts)
