import { describe, expect, it } from 'vitest'; import nextConfig from '../../next.config'; describe('homepage next config', () => { it('proxies same-origin API requests to the API service before app rewrites', async () => { const rewrites = await nextConfig.rewrites?.(); expect(rewrites).toEqual( expect.arrayContaining([ { source: '/api/:path*', destination: 'http://api:4000/api/:path*', }, ]), ); }); });