vibes-plug-testing · git:20261026.e77f2b7 · 2026-10-26 · sha256 7b8b70a155c9191f
vibes-plug-testing git:20261026.e77f2b7A
Immutable. This exact content never changes and is served at /api/v1/blob/7b8b70a155c9191f.
---
alwaysApply: false
description: "Vibes-Plug Testing & Verification Standards — Autonomous TDD, Vitest, Playwright, zero mocks in production, and invariant assertions"
globs: "**/*.{test,spec}.{ts,js,py,go},tests/**,cypress/**,e2e/**"
---
# Vibes-Plug Testing & Verification Standards (2026 Edition)
When writing or executing tests, Cursor AI MUST enforce these standards:
## 1. Autonomous TDD & Quality Gate
- **Test-First Execution**: When implementing new features, write failing tests first (Red), implement the minimum code to pass (Green), then refactor (Clean).
- **Zero Mocks in Production Logic**: Mocks are strictly confined to test fixtures. Never commit fake mocks or in-memory array stubs into production service code.
- **Determinism**: Eliminate flaky tests by utilizing deterministic clocks (`vi.useFakeTimers()` or Playwright Clock API) and avoiding non-deterministic `sleep()` intervals.
- **Coverage Criteria**: Test both the happy path and edge cases: invalid inputs, boundary values, permission denials, and network failure modes.
- **E2E Standards**: Use ARIA role selectors (`getByRole`, `getByLabel`) rather than brittle CSS or XPath selectors.