cometchat-react-native-testing
Installation
SKILL.md
Ground truth:
catalogs/rn-v5.json+catalogs/rn-sdk-v4.json. Build the feature; do NOT test it unless asked. Use this skill only when the developer asks for tests. Never add a test framework, e2e suite or CI to a project that did not request one.
Companion skills (read first)
cometchat-react-native-core— install, provider chain, init→login→render. Assumed, not repeated here.
Use this skill when
- "write tests for the chat screen" · "mock CometChat in Jest" · "add Detox coverage for chat"
Prerequisites & install
React Native ships Jest. Add the renderer:
npm install --save-dev @testing-library/react-native
Mock the SDK — never let a unit test hit the network
CometChat opens a websocket and needs real credentials. Mock at the module boundary: