Frontend Testing Pack

    by mochalatte

    1

    Audit and refactor frontend tests across React Testing Library, Vitest, Playwright, MSW, and Storybook.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Review this test: it('submits', () => { render(); fireEvent.change(screen.getByTestId('input'), {target: {value: 'test'}}); fireEvent.click(screen.getByTestId('btn')); });

    Your agent does

    Audit

    1. fireEvent used instead of userEvent.
    2. getByTestId used where getByRole is preferred for accessibility.

    Fixes

    Replace with: await user.type(screen.getByRole('textbox', { name: /email/i }), 'test'); await user.click(screen.getByRole('button', { name: /submit/i }));

    What you get

    Replace brittle fireEvent calls with realistic userEvent sequences.Identify missing async waitFor patterns causing flaky test failures.Refactor Playwright scripts to use structured test.step and fixtures.Validate MSW server handlers and Storybook interaction play functions.

    About this skill

    The problem

    Frontend tests often rot into unmaintainable, flaky, and low-confidence suites due to implementation-leakage and outdated patterns. Manual code review frequently misses subtle anti-patterns like improper async handling or brittle selectors that break on every UI refactor.

    What it does

    • Identifies common anti-patterns like fireEvent over userEvent and getByTestId instead of accessible role queries.
    • Audits Vitest configurations for issues with mock hoisting, timer cleanup, and thread safety.
    • Checks Playwright scripts for missing test.step logging, unstable timeouts, and inefficient authentication flows.
    • Validates MSW handler structures and Storybook CSF3 compliance including interaction testing via the play function.

    Frameworks & tools

    React Testing Library, Vitest, Playwright, MSW (Mock Service Worker), and Storybook.

    Why this beats prompting it yourself

    General LLMs often suggest deprecated patterns or mix syntax between different testing libraries. This skill enforces a strict 5-part sub-skill matrix to ensure your Vitest mocks don't leak into your Playwright fixtures while providing line-by-line fixes for modern best practices.

    Use cases

    • Migrating legacy Jest/Enzyme suites to modern React Testing Library and Vitest.
    • Debugging flaky CI pipelines by identifying improper async waitFor usage.
    • Standardizing team testing patterns across component stories and E2E scripts.
    • Performing accessibility-first audits by enforcing ARIA role-based selectors.

    Known limitations

    Operates only on provided source code. It does not execute tests, install dependencies, or interact with a live browser environment.

    How to install

    Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean today

    Listedtoday

    Frequently Asked Questions

    Popular in Testing & QA