cometchat-react-v7-testing
Installation
SKILL.md
Ground truth:
@cometchat/chat-uikit-react@7. Component/method names come fromcometchat-react-v7-core+ its catalog; signatures are FETCHED viacometchat-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.