11 lines
345 B
TypeScript
11 lines
345 B
TypeScript
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/']),
|
||
|
|
);
|
||
|
|
});
|
||
|
|
});
|