Gate Tests

How to use the `@gate` / `@force-gate` test directives instead of `it.skip` or fake-green skip patterns. Use when a test is known-failing under some test-matrix dimension (dev mode, a bundler, an experimental flag like cacheComponents), when converting `if (isNextDev) return` guards or env-var `describe.skip` branches, when adding a condition to test/lib/gate/conditions.ts, or when keying a fixture's experimental flag on a __NEXT_TEST_AXIS letter. Covers directive choice, condition tiers, the test-axis fixture pattern, pitfalls, and verification commands.

Vercel Labs 7dca7fd 10.5 KB Updated 28.7k repo stars

File contents

vercel-labs/next.js/tree/main/.agents/skills/gate-tests commit 7dca7fd884

Frequently asked questions

npx skillmds@latest add vercel-labs/gate-tests