Agent skill

Cometchat React V7 Testing

by cometchat in cometchat/cometchat-skills

Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke.

MITAuto-check passedTesting & QA

Install Cometchat React V7 Testing

skills CLI
$ npx skills add cometchat/cometchat-skills --skill cometchat-react-v7-testing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cometchat/cometchat-skills cometchat-react-v7-testing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cometchat/cometchat-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cometchat-react-v7-testing .claude/skills/cometchat-react-v7-testing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cometchat-react-v7-testing
GitHub stars
129
Token cost
~1.1k tokens
SKILL.md length
482 words
Files
1
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke.

  • Works in 4 steps: Synchronous assertions before init… → Asserting on kit DOM classes — they… → A real login in unit tests — mock… → …
  • Tasks that involve Unit testing
  • SKILL.md covers Companion skills (read first), Use this skill when, Decide what you are testing and Mock the SDK in unit tests, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Cometchat React V7 Testing is an agent skill from cometchat/cometchat-skills. Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke. Triggers: 'test my cometchat react app', 'mock cometchat in jest/vitest', 'unit test chat component', 'playwright test for chat', 'how do I test cometchat'.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: @cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vitest / Jest / React Testing Library / Playwright

It sits in Testing & QA, covering Unit testing and End-to-end testing. It works with CometChat, React, Playwright and Jest. The repository describes itself as: Add CometChat chat & messaging and voice & video calls to any React, Next.js, React Native, Angular, Android, iOS, or Flutter project through your AI coding agent. Works with… The licence is MIT.

When your agent uses it

  • Tasks that involve Unit testing
  • Tasks that involve End-to-end testing

Example prompts

  • “test my cometchat react app”
  • “mock cometchat in jest/vitest”
  • “unit test chat component”
  • “/cometchat-react-v7-testing”

Requirements

  • Compatibility (from SKILL.md): @cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vitest / Jest / React Testing Library / Playwright

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Synchronous assertions before init resolves — flaky; use findBy*/waitFor.
  2. Asserting on kit DOM classes — they change across versions; assert your own markup + roles.
  3. A real login in unit tests — mock CometChatUIKit; never ship a test Auth Key to prod env files.
  4. StrictMode double-invoke — mocks must be idempotent (return the same resolved user), mirroring the app's in-flight guard.

What it can do on your machine

Read from SKILL.md and the folder at commit 911b108. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    @cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vitest / Jest / React Testing Library / Playwright

    From compatibility in the SKILL.md frontmatter.

Context cost

Cometchat React V7 Testing loads about 1.1k tokens when it runs. Until then it costs about 93 tokens; SKILL.md has 482 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~93
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from cometchat/cometchat-skills at commit 911b108, republished under its MIT licence (© cometchat). 482 words, ~1,135 tokens.

Download SKILL.mdSave it as .claude/skills/cometchat-react-v7-testing/SKILL.md (or your agent's skills folder).
name
cometchat-react-v7-testing
description
Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke. Triggers: 'test my cometchat react app', 'mock cometchat in jest/vitest', 'unit test chat component', 'playwright test for chat', 'how do I test cometchat'.
compatibility
@cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vitest / Jest / React Testing Library / Playwright
license
MIT
metadata.author
CometChat
metadata.version
1.0.0
metadata.tags
cometchat react v7 testing vitest jest playwright mock rtl

Ground truth: @cometchat/chat-uikit-react@7. Component/method names come from cometchat-react-v7-core + its catalog; signatures are FETCHED via cometchat-react-v7-core/references/docs-map.md. The UI Kit docs have no dedicated testing page — this is the pack's own guidance (tracked DOCS GAP). Never assert against kit-internal DOM classes; they are not a public contract.

Companion skills (read first)

  • cometchat-react-v7-core — the init→login→render lifecycle these tests exercise.

Use this skill when

Adding tests around a CometChat integration, or a "how do I test this" question. NOT part of a normal build — only when tests are explicitly asked for (RULES.md → Verification scope).

Decide what you are testing

You are testing your code, not CometChat's kit. Three layers:

  • Your logic (token fetch, UID mapping, routing, state) → unit-test in isolation, mock the SDK.
  • Your wiring (does the surface mount after init+login, are the right props passed) → render under a test provider with the SDK mocked.
  • The real round-trip (send → receive) → a thin E2E against a test app, not a unit test.

Do not unit-test that CometChatMessageList renders messages — that is the kit's own test surface.

Mock the SDK in unit tests

Mock the two entry modules so nothing hits the network and no real login is attempted:

tsx
vi.mock("@cometchat/chat-sdk-javascript", () => ({ CometChat: { getLoggedinUser: vi.fn().mockResolvedValue(null) } }));
vi.mock("@cometchat/chat-uikit-react", async (orig) => ({
  ...(await orig()),
  CometChatUIKit: { initFromSettings: vi.fn().mockResolvedValue(null), getLoggedInUser: vi.fn().mockReturnValue(null), login: vi.fn().mockResolvedValue({ getUid: () => "u1" }), loginWithAuthToken: vi.fn().mockResolvedValue({ getUid: () => "u1" }), logout: vi.fn().mockResolvedValue(undefined) },
}));

(Jest: swap vi for jest.) Now assert your own token-fetch and error handling without a backend.

Render the surface under test

The kit surface mounts only after init+login resolve. Tests must await that gate, not assert synchronously:

tsx
render(<App />);
expect(await screen.findByText(/sign in|loading|chats/i)).toBeInTheDocument();

Prefer findBy* (async) over getBy*; a synchronous query runs before the init promise settles and fails intermittently. Wrap the surface in CometChatErrorBoundary in the app so a thrown error surfaces as a testable fallback, not an unhandled rejection.

Show full SKILL.md (214 more words)Show less

E2E smoke (Playwright)

One high-value path against a real test app (seeded users, dev Auth Key in a test-only env): load the app, sign in, assert the conversation list renders with real height and a message can be sent. Assert on your visible text/roles and the presence of the mounted surface — not on kit BEM classes. Keep it to the happy path plus one auth-failure path; the kit's internals are already tested upstream.

Not worth automating

Kit component internals, exhaustive prop matrices, live calls/push (device-dependent), and pixel snapshots of kit UI (they churn across minor kit versions). Spend the budget on your token flow, UID mapping, and the init-gate wiring.

Common pitfalls

  1. Synchronous assertions before init resolves — flaky; use findBy*/waitFor.
  2. Asserting on kit DOM classes — they change across versions; assert your own markup + roles.
  3. A real login in unit tests — mock CometChatUIKit; never ship a test Auth Key to prod env files.
  4. StrictMode double-invoke — mocks must be idempotent (return the same resolved user), mirroring the app's in-flight guard.

Verify it works

Unit tests pass with the SDK mocked (no network) · the surface test awaits the init gate and finds the mounted UI · the E2E smoke signs in and renders conversations against a test app · no test asserts a kit-internal class.

© cometchat, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/cometchat-react-v7-testing of cometchat/cometchat-skills.

Open the folder on GitHubat commit 911b108

Compare with similar skills

Cometchat React V7 Testing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cometchat React V7 Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cometchat React V7 Testing this skillcometchat/cometchat-skills129—~1.1kAutomated safety check: PassMIT
React Testingaffaan-m/ECC274k1 repos~3.3kAutomated safety check: PassMIT
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
Playwright Testingchongdashu/vibejam-starter-pack149—~2.2kAutomated safety check: PassNone
Testing FundamentalsDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT
Senior QAalirezarezvani/claude-skills28k1 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • React Testing

    affaan-m/ECC

    React component testing with React Testing Library, Vitest/Jest, MSW for network mocking, accessibility assertions with axe, and the decision boundary between component tests and Playwright/Cypress…

    274k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.2k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Testing Fundamentals

    DanielPodolsky/ownyourcode

    Guides test strategy for unit, integration, and E2E testing.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Senior QA

    alirezarezvani/claude-skills

    Generates unit tests, integration tests, and E2E tests for React/Next.js applications.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • Frontend Typescript Testing

    shinpr/ai-coding-project-boilerplate

    Designs frontend tests using the repository's configured React test and browser harnesses, including RTL, MSW, Vitest, and Playwright when present.

    232 GitHub stars~1.5k tokensUpdated 3 days ago
    Testing & QAAuto-check passed

More from cometchat/cometchat-skills

All 97 skills in this repo
  • CometChat Android Calls SDK v5

    cometchat/cometchat-skills

    Adds voice and video calling to an Android app in Kotlin with the headless CometChat Calls SDK v5, covering meeting-style rooms, 1:1 ringing calls, call logs and recording.

    129 GitHub stars~5.2k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Android v5 Headless SDK

    cometchat/cometchat-skills

    Builds chat on Android with your own UI against the headless CometChat Chat SDK v5, covering install, Jetifier conflicts, credentials and init-before-login ordering.

    129 GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Component Picker

    cometchat/cometchat-skills

    Picks and customizes CometChat's Angular UI Kit components by their verified component list, exact input and output event names, and the surfaces that have no kit component at all.

    129 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Features

    cometchat/cometchat-skills

    Enables or builds CometChat features such as polls, reactions, smart replies and pinned messages in an Angular app, first classifying how much client code each one needs.

    129 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check passed
  • CometChat Angular Chat Placement

    cometchat/cometchat-skills

    Decides where CometChat chat UI goes in an Angular app: a dedicated route, a dashboard panel, a support widget or the full multi-pane app, with thread and search panels.

    129 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed
  • Cometchat iOS V5 SDK

    cometchat/cometchat-skills

    Add voice & video calling to any iOS app FROM SCRATCH with the headless CometChat Calls SDK v5 (CometChatCallsSDK, via Swift Package Manager) — no UI Kit.

    129 GitHub stars~5.2k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Cometchat React V7 Testing

What does Cometchat React V7 Testing do?

Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke. Cometchat React V7 Testing is an agent skill from cometchat/cometchat-skills. Test a React app that embeds CometChat v7 — what to mock vs exercise for real, rendering kit components under a test provider, waiting out the async init→login gate, and a lean E2E smoke.

When should I use Cometchat React V7 Testing?

Cometchat React V7 Testing fits situations like: tasks that involve Unit testing; tasks that involve End-to-end testing.

How do I install Cometchat React V7 Testing in Claude Code?

Run `npx skills add cometchat/cometchat-skills --skill cometchat-react-v7-testing -a claude-code`. Or copy the skill folder (skills/cometchat-react-v7-testing in cometchat/cometchat-skills) into .claude/skills/cometchat-react-v7-testing in your project. Claude Code loads it when a task matches its description.

How do I install Cometchat React V7 Testing in Codex?

Run `npx skills add cometchat/cometchat-skills --skill cometchat-react-v7-testing -a codex`. Or copy the skill folder (skills/cometchat-react-v7-testing in cometchat/cometchat-skills) into .agents/skills/cometchat-react-v7-testing in your project. Codex loads it when a task matches its description.

Can I use Cometchat React V7 Testing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cometchat/cometchat-skills --skill cometchat-react-v7-testing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cometchat-react-v7-testing, .gemini/skills/cometchat-react-v7-testing, .github/skills/cometchat-react-v7-testing and .opencode/skills/cometchat-react-v7-testing in your project.

What does Cometchat React V7 Testing need to run?

SKILL.md names no scripts, command-line tools or credentials: Cometchat React V7 Testing is instructions for the agent only. Compatibility (from SKILL.md): @cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vitest / Jest / React Testing Library / Playwright.

Does Cometchat React V7 Testing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cometchat React V7 Testing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cometchat React V7 Testing use?

Cometchat React V7 Testing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cometchat React V7 Testing use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cometchat React V7 Testing?

Skills that share tags, products or a category with Cometchat React V7 Testing: React Testing (affaan-m/ECC, 274k stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars) and Testing Fundamentals (DanielPodolsky/ownyourcode, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cometchat React V7 Testing?

cometchat (a GitHub organization) maintains it in cometchat/cometchat-skills, which has 129 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 5, 2026.

Source: cometchat/cometchat-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.