1389a65e18
Implements the Groups & Routes admin page with a client-side RouteManager component (add/delete sync routes via fetch), server-side groups page that pre-fetches groups/routes from the API, and Next.js Route Handler proxies for /api/routes (GET, POST) and /api/routes/[id] (DELETE). Adds a custom jest environment that polyfills Node 18+ native fetch into the jsdom sandbox so tests can use jest.spyOn(global, 'fetch'). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 lines
437 B
JavaScript
12 lines
437 B
JavaScript
const nextJest = require('next/jest');
|
|
|
|
const createJestConfig = nextJest({ dir: './' });
|
|
|
|
module.exports = createJestConfig({
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
// Custom environment that extends jest-environment-jsdom and polyfills the
|
|
// native Node 18+ Fetch API so tests can use jest.spyOn(global, 'fetch').
|
|
testEnvironment: '<rootDir>/jest.environment.js',
|
|
testMatch: ['**/*.test.tsx', '**/*.test.ts'],
|
|
});
|