import robots from '@/app/robots'; describe('robots.txt', () => { it('disallows the admin panel and the CMS API', () => { const rules = robots().rules; const rule = Array.isArray(rules) ? rules[0] : rules; expect(rule.disallow).toEqual( expect.arrayContaining(['/api/', '/_next/', '/admin/', '/cms-api/']), ); }); }); describe('sitemap discovery', () => { it('lists both the proxied school sitemap and the Next-owned content sitemap', () => { expect(robots().sitemap).toEqual([ 'https://www.schoolcompare.co.uk/sitemap.xml', 'https://www.schoolcompare.co.uk/content-sitemap.xml', ]); }); });