test
π―Skillfrom facebook/react
Runs React codebase tests across different release channels with configurable flags and test patterns.
Installation
npx skills add https://github.com/facebook/react --skill testSkill Details
Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.
Overview
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
- experimental β yarn test -r=experimental --silent --no-watchman
- stable β yarn test-stable --silent --no-watchman
- classic β yarn test-classic --silent --no-watchman
- www β yarn test-www --silent --no-watchman
- www variant false β yarn test-www --variant=false --silent --no-watchman
- 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.
More from this repository6
Automatically fixes code formatting and linting issues to ensure clean, compliant code before committing.
Validates code changes by running formatting, linting, type checking, and testing across source and www directories.
Extracts and manages error codes for React, helping developers identify and assign unique codes to new error messages.
Manages React feature flags across channels, enabling targeted testing, gating, and debugging of experimental features with precise control.
Runs Flow type checking for React code, detecting type errors across different renderers like DOM, browser, and React Native.
Checks and compares feature flag states across different release channels with detailed visualization and debugging capabilities.