
Test
Run React core unit tests with the correct release channel flags when you contribute to or fork the React repository and need channel-accurate CI locally.
Install
npx skills add https://github.com/facebook/react --skill testWhat is this skill?
- Parses /test arguments into yarn commands with --silent --no-watchman defaults
- Supports source (default), experimental, stable, www, www variant false, and classic channels
- Maps __VARIANT__ and __EXPERIMENTAL__ flag profiles to the right test runner
- Watch mode for TDD via /test watch <pattern>
- Pattern-based test selection (e.g. ReactFiberHooks)
Adoption & trust: 962 installs on skills.sh; 246k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Journey fit
Ship → testing is the canonical shelf because the skill maps arguments directly to yarn test commands across React release channels. Testing subphase matches pre-merge verification, watch-mode TDD, and channel-specific regression runs before publishing or syncing with upstream.
Common Questions / FAQ
Is Test safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Test
Run tests for the React codebase. Arguments: - $ARGUMENTS: Channel, flags, and test pattern Usage Examples: - `/test ReactFiberHooks` - Run with source channel (default) - `/test experimental ReactFiberHooks` - Run with experimental channel - `/test www ReactFiberHooks` - Run with www-modern channel - `/test www variant false ReactFiberHooks` - Test __VARIANT__=false - `/test stable ReactFiberHooks` - Run with stable channel - `/test classic ReactFiberHooks` - Run with www-classic channel - `/test watch ReactFiberHooks` - Run in watch mode (TDD) Release Channels: - `(default)` - Source/canary channel, uses ReactFeatureFlags.js defaults - `experimental` - Source/experimental channel with __EXPERIMENTAL__ flags = true - `www` - www-modern channel with __VARIANT__ flags = true - `www variant false` - www channel with __VARIANT__ flags = false - `stable` - What ships to npm - `classic` - Legacy www-classic (rarely needed) Instructions: 1. Parse channel from arguments (default: source) 2. Map to yarn command: - (default) → `yarn test --silent --no-watchman <pattern>` - experimental → `yarn test -r=experimental --silent --no-watchman <pattern>` - stable → `yarn test-stable --silent --no-watchman <pattern>` - classic → `yarn test-classic --silent --no-watchman <pattern>` - www → `yarn test-www --silent --no-watchman <pattern>` - www variant false → `yarn test-www --variant=false --silent --no-watchman <pattern>` 3. Report test results and any failures Hard Rules: 1. **Use --silent to see failures** - This limits the test output to only failures. 2. **Use --no-watchman** - This is a common failure in sandboxing. Common Mistakes: - **Running without a pattern** - Runs ALL tests, very slow. Always specify a pattern. - **Forgetting both www variants** - Test `www` AND `www variant false` for `__VARIANT__` flags. - **Test skipped unexpectedly** - Check for `@gate` pragma; see `feature-flags` skill.