UNPKG

ruch

Version:

Revolutionary React TypeScript CLI with hexagonal architecture & AI-powered development assistance. Create maintainable, scalable applications with domain-driven design and integrated AI tooling.

22 lines (16 loc) 509 B
// MSW Server Configuration // This file sets up MSW for Node.js/testing environment import { setupServer } from 'msw/node'; import { handlers } from './handlers/index'; // Setup server with all domain handlers export const server = setupServer(...handlers); // Server lifecycle for tests export const startMswServer = () => { server.listen({ onUnhandledRequest: 'warn' }); }; export const resetMswServer = () => { server.resetHandlers(); }; export const stopMswServer = () => { server.close(); };