cometchat-react-testing

Community

Ship CometChat tests with confidence.

AuthorMAX5271
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves flaky or misleading test suites for CometChat React UI Kit integrations by giving a consistent, production-aligned testing blueprint for unit, component, and end-to-end chat flows.

Core Features & Use Cases

  • Vitest + React Testing Library foundation: Provides a jsdom test environment setup, cleanup discipline, and common browser API polyfills (WebSocket, matchMedia) so UI tests run reliably.
  • Deterministic SDK mocking: Defines a canonical hoisted mock for @cometchat/chat-sdk-javascript and @cometchat/chat-uikit-react, enabling reliable init/login/render behavior tests without real network calls.
  • Chat-specific safety assertions: Includes rules that validate init ordering, verify visible error UI on failures (including red/error styling checks), ensure no Auth Key leakage in test-adjacent source, and confirm css-variables.css is imported exactly once.
  • Playwright e2e chat smoke tests: Adds a two-user messaging smoke test and CI-friendly configuration to validate real chat behavior over WebSocket.
  • Use Case: When upgrading CometChat UI Kit or migrating frameworks (Vite/Next.js/Astro), use this Skill to quickly establish reliable regression coverage for core chat flows and catch integration breaks early.

Quick Start

Use the cometchat-react-testing Skill to generate a Vitest setup, shared SDK mocks, and one Playwright two-user chat smoke test for your project’s existing CometChat integration.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cometchat-react-testing
Download link: https://github.com/MAX5271/CometChat/archive/main.zip#cometchat-react-testing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.