این اسکیل چه میکند؟
برای نوشتن/تغییر تست مربوط به درخواست prefetch، navigationِ client router یا segment cache. ابزار createRouterAct در test/lib/router-act.ts امکان assertion سرتاسری پاسخ prefetch/navigation را بدون وابستگی به تعداد دقیق درخواست یا جزئیات protocol میدهد؛ به همین دلیل بیشتر تستهای client router این الگو را به کار میبرند.
Use this skill when writing or modifying tests that involve prefetch requests, client router navigations, or the segment cache. The createRouterAct utility from test/lib/router-act.ts lets you assert on prefetch and navigation responses in an end-to-end way without coupling to the exact number of requests or the protocol details. This is why most client router-related tests use this pattern.
چه زمانی به کار میآید؟
برای نوشتن/تغییر تست مربوط به درخواست prefetch، navigationِ client router یا segment cache. ابزار createRouterAct در test/lib/router-act.ts امکان assertion سرتاسری پاسخ prefetch/navigation را بدون وابستگی به تعداد دقیق درخواست یا جزئیات protocol میدهد؛ به همین دلیل بیشتر تستهای client router این الگو را به کار میبرند.
Use this skill when writing or modifying tests that involve prefetch requests, client router navigations, or the segment cache. The createRouterAct utility from test/lib/router-act.ts lets you assert on prefetch and navigation responses in an end-to-end way without coupling to the exact number of requests or the protocol details. This is why most client router-related tests use this pattern.
کاربردهای مرتبط
برچسبگذاری خودکار بر اساس نام و توضیح؛ ممکن است نیازمند اصلاح باشد.