test

โดย facebook

รันการทดสอบสำหรับโค้ดเบส React ผ่านช่องทางเผยแพร่และการกำหนดค่าหลายแบบ รองรับช่องทางเผยแพร่หกช่องทาง: source (ค่าเริ่มต้น), experimental, www, www พร้อม variant false, stable และ classic ซึ่งแต่ละช่องทางมีการกำหนดค่าแฟล็กฟีเจอร์ที่แตกต่างกัน รองรับรูปแบบการทดสอบ โหมด watch สำหรับ TDD และแฟล็ก variant เพื่อทดสอบเส้นทางโค้ดที่แตกต่าง ต้องระบุอาร์กิวเมนต์รูปแบบการทดสอบอย่างชัดเจนเพื่อหลีกเลี่ยงการรันชุดทดสอบทั้งหมด ใช้แฟล็ก --silent เพื่อแสดงข้อผิดพลาด และ --no-watchman สำหรับการแซนด์บ็อกซ์...

npx skills add https://github.com/facebook/react --skill 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.

Skills เพิ่มเติมจาก facebook

api-health
facebook
Monitor API health for a Meta app — check rate limits, call volume, and API deprecations. Use to diagnose throttling, plan capacity, or prepare for API version…
official
api-integration
facebook
แนะนำนักพัฒนาในการตั้งค่าการเชื่อมต่อ Meta API ตั้งแต่เริ่มต้น — ค้นหา API ที่เหมาะสม ดึงคู่มือการตั้งค่า ข้อกำหนดการยืนยันตัวตน…
official
app-review-prep
facebook
เตรียมแอป Meta สำหรับ App Review — ตรวจสอบสถานะปัจจุบัน ข้อกำหนดที่ค้างอยู่ สิทธิ์ที่ได้รับ และประวัติการส่ง ใช้ก่อนส่งแอป…
official
debug-webhooks
facebook
แก้ไขปัญหาเว็บฮุคสำหรับแอป Meta — ตรวจสอบการสมัครใช้งานที่ใช้งานอยู่ ระบุการตั้งค่าที่ผิดพลาด และส่งเพย์โหลดทดสอบเพื่อยืนยันการส่งมอบ ใช้เมื่อ…
official
webhook-setup
facebook
Set up webhooks for a Meta app end-to-end — discover available topics, subscribe to fields, and verify with a test payload. Use when configuring webhooks for…
official
buck2-rule-basics
facebook
แนะนำผู้ใช้ผ่านการเขียนกฎ Buck2 ตัวแรก เพื่อเรียนรู้แนวคิดพื้นฐาน ได้แก่ กฎ แอ็กชัน เป้าหมาย คอนฟิกูเรชัน การวิเคราะห์ และ select() ใช้…
official
add-ir-instruction
facebook
คู่มือสำหรับการเพิ่ม IR instruction ใหม่ให้กับ Hermes compiler ใช้เมื่อผู้ใช้ขอให้เพิ่ม สร้าง หรือกำหนด IR instruction ใหม่ (Inst/Instruction) ใน...
official
binary-size-analysis
facebook
ทักษะนี้ควรใช้เมื่อผู้ใช้ต้องการวิเคราะห์การเปลี่ยนแปลงขนาดไบนารีของ hermesvm ในช่วงของคอมมิต ใช้เมื่อผู้ใช้กล่าวถึง "binary size",…
official