e2e-test-duplication
E2E test contains duplicated code that should use shared helpers
Applies to: JavaScript, SPEC.JS, SPEC.TS, TEST.JS, TEST.TS, TypeScript
Why this matters
E2E tests often accumulate duplicated login helpers, hardcoded credentials, inline selectors, and magic timeout values. This makes tests brittle and hard to maintain. Extract common patterns to a shared helpers file.
Catch it before it ships
pip install stablestack # or: npx stablestackstablestack # scans your project, TEST005 includedstablestack explain TEST005TEST005 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.
False positive in your codebase? Suppress a single line with # noqa: TEST005
More Testing checks
skipped-tests
Test is marked as skipped.
TEST003async-mock-issues
Async function mocked incorrectly.
TEST004duplicate-test-helpers
Test helper function may be duplicated across test files.
TEST006e2e-console-capture
E2E tests should capture console errors to catch silent JavaScript failures.
TEST007missing-e2e-tests
Web projects should have Playwright E2E tests to catch console errors and broken pages.
TEST008playwright-test-slow-misuse
Detects incorrect test.slow() usage that silently skips tests.
TEST009playwright-wait-for-timeout
waitForTimeout() in tests waits for arbitrary time instead of content/state.
TEST010instant-visibility-before-assert
safeVisible() or isVisible() result used in expect() — instant checks don't wait for elements to render, causing flaky tests.