test
facebook/react
Run React core tests across source, experimental, www, and stable channels.
What is test?
Executes the React test suite with support for multiple release channels and test patterns. Use this when you need to validate React core functionality, test specific modules, or run tests in watch mode during development.
- Run tests against source (canary), experimental, www-modern, www-classic, or stable channels
- Filter tests by pattern to run specific test files or modules
- Execute tests in watch mode for test-driven development
- Test with different __VARIANT__ and __EXPERIMENTAL__ flag configurations
- Report test failures and results with silent output for clarity
How to install test
npx skills add https://github.com/facebook/react --skill test- React repository cloned locally
- Node.js and yarn installed
- Familiarity with React's release channels and feature flags
How to use test
- 1.Specify a test pattern (e.g., ReactFiberHooks) to avoid running all tests
- 2.Choose a channel: default (source), experimental, www, www variant false, stable, or classic
- 3.Add watch mode flag if iterating on code
- 4.Run the skill with your chosen arguments, e.g., `/test experimental ReactFiberHooks`
- 5.Review test output; failures are highlighted with --silent flag
Use cases
- Validate changes to React core before submitting a pull request
- Test a specific module like ReactFiberHooks across all release channels
- Run tests in watch mode while iterating on React internals
- Verify experimental features work correctly with __EXPERIMENTAL__ flags enabled
- Test www variant behavior with both __VARIANT__=true and __VARIANT__=false
- React core contributors and maintainers
- Developers working on React internals or feature flags
- Contributors testing changes across multiple release channels
test FAQ
Source (default) uses ReactFeatureFlags.js defaults; experimental enables __EXPERIMENTAL__ flags; www-modern and www-classic test web-specific builds; stable tests the npm release version.
The __VARIANT__ flag controls different code paths in the www channel. Testing both ensures your changes work in all configurations.
It suppresses verbose test output and shows only failures, making it easier to spot issues.
Technically yes, but it's very slow. Always specify a test pattern like ReactFiberHooks to target specific modules.
Check for @gate pragmas in the test file; they conditionally skip tests based on feature flags. Use the feature-flags skill to understand flag requirements.
Full instructions (SKILL.md)
Source of truth, from facebook/react.
name: test description: Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.
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 defaultsexperimental- Source/experimental channel with EXPERIMENTAL flags = truewww- www-modern channel with VARIANT flags = truewww variant false- www channel with VARIANT flags = falsestable- What ships to npmclassic- Legacy www-classic (rarely needed)
Instructions:
- Parse channel from arguments (default: source)
- 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>
- (default) →
- Report test results and any failures
Hard Rules:
- Use --silent to see failures - This limits the test output to only failures.
- 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
wwwANDwww variant falsefor__VARIANT__flags. - Test skipped unexpectedly - Check for
@gatepragma; seefeature-flagsskill.
Related skills
More from facebook/react and the wider catalog.


