router-act
An internal skill in the Next.js repository for writing end-to-end tests that involve prefetching, client-side navigation or the segment cache.
スキルの内容
An internal skill in the Next.js repository for writing end-to-end tests that involve prefetching, client-side navigation or the segment cache. It explains the repository's createRouterAct helper, which intercepts router requests inside a scope, buffers the responses and asserts on them, so tests do not depend on exact request counts. Links are hidden behind a LinkAccordion component and revealed inside the scope so prefetches happen only when the test wants them, and the preferred assertion proves the cache served the data with no requests. It warns against polling and timeouts, reading page content before the scope ends, and going back with open accordions, and uses Playwright's fake clock for staleness tests.
できること
- Control router prefetch timing in tests
- Assert that the cache served a navigation
- Test staleness with a fake clock
概要
- 公開元
- Vercel
- ツール
- Playwright
インストール
プロジェクトのドキュメントに、確認できるインストール手順がありません。 プロジェクトの手順を見る
MCPサーバーやスキルは、お使いのコンピューターでコードを実行したり、データを操作したりできます。インストールする前にソースを確認してください。
詳細
Vercelのほかの掲載
サーバー1件 · スキル69件
- vercel-cli (スキル)
- vercel-flags (スキル)
- access-protected-vercel-deployment (スキル)
- ai-gateway (スキル)
- ai-sdk (スキル)
- auth (スキル)
こちらにも掲載: テスト
出典
- スキルファイル(SKILL.md)github.com/vercel/next.js2026年11月10日
- GitHubリポジトリgithub.com/vercel/next.js · 根拠となる項目:ライセンス, 公開元, 活動状況2026年11月11日
- リポジトリ内のフォルダ(router-act)github.com/vercel/next.js · 根拠となる項目:スクリプトを含む2026年11月10日