ESLint plugin for flagging weak tests before they become false confidence.
The first rule set focuses on:
- snapshot-only coverage;
- mock-call-only tests;
- unawaited Promise assertions;
- async tests without assertions;
- suites that never exercise a negative path.
npm install --save-dev eslint-plugin-test-signal eslint typescriptimport testSignal from "eslint-plugin-test-signal";
export default [testSignal.configs.recommended];The bundled presets target common test file globs and register
@typescript-eslint/parser automatically.
import testSignal from "eslint-plugin-test-signal";
export default [
testSignal.configs.minimal,
// testSignal.configs.recommended,
// testSignal.configs["recommended-type-checked"],
// testSignal.configs.strict,
// testSignal.configs.all,
// testSignal.configs.experimental,
];| Preset | Intent |
|---|---|
testSignal.configs.minimal |
Lowest-noise async correctness checks. |
testSignal.configs.recommended |
Default weak-test signal coverage. |
testSignal.configs["recommended-type-checked"] |
Compatibility preset for future typed rules. |
testSignal.configs.strict |
Recommended plus negative-path coverage enforcement. |
testSignal.configs.all |
Every stable rule. |
testSignal.configs.experimental |
Stable rules plus future candidates. |
Fixlegend:fix= autofixablesuggest= suggestions available-= report only
Preset keylegend:
- Supported ESLint versions:
9.xand10.x - Config system: Flat Config
- Node.js runtime:
>=22.0.0