Skip to content

Mock Package (@vup/mock)

@vup/mock provides an MSW-based mock layer for development and integration.

What It Solves

  • Enables frontend-first delivery before backend is ready
  • Keeps request paths stable between mock and real API
  • Makes edge-case and error-path testing easier

Typical Scenarios

  • Parallel frontend/backend development
  • Temporary simulation for unstable APIs
  • Reproducible QA and demo environments
  1. Keep API function signatures unchanged
  2. Toggle mock by environment switch
  3. Remove ad-hoc inline fake data from business code