PluginBench
Skill
Official
Review
Audit score 70

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
Prerequisites
  • React repository cloned locally
  • Node.js and yarn installed
  • Familiarity with React's release channels and feature flags
Claude Code
Cursor
Windsurf
Cline

How to use test

  1. 1.Specify a test pattern (e.g., ReactFiberHooks) to avoid running all tests
  2. 2.Choose a channel: default (source), experimental, www, www variant false, stable, or classic
  3. 3.Add watch mode flag if iterating on code
  4. 4.Run the skill with your chosen arguments, e.g., `/test experimental ReactFiberHooks`
  5. 5.Review test output; failures are highlighted with --silent flag

Use cases

Good for
  • 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
Who it's for
  • React core contributors and maintainers
  • Developers working on React internals or feature flags
  • Contributors testing changes across multiple release channels

test FAQ

What's the difference between the release channels?

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.

Why should I test both www and www variant false?

The __VARIANT__ flag controls different code paths in the www channel. Testing both ensures your changes work in all configurations.

What does --silent do?

It suppresses verbose test output and shows only failures, making it easier to spot issues.

Can I run all tests without a pattern?

Technically yes, but it's very slow. Always specify a test pattern like ReactFiberHooks to target specific modules.

What if a test is skipped unexpectedly?

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 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.