Files
gw-svelte/src/routes/robots.txt/robots.test.ts
T
ponzischeme89 b7ea05f150 Initial commit
2026-05-02 08:26:18 +12:00

15 lines
512 B
TypeScript

import { describe, expect, it } from 'vitest';
import { GET } from './+server';
describe('robots endpoint', () => {
it('returns the crawl policy and sitemap location', async () => {
const response = GET();
const body = await response.text();
expect(response.headers.get('content-type')).toBe('text/plain; charset=utf-8');
expect(body).toContain('User-agent: *');
expect(body).toContain('Allow: /');
expect(body).toContain('Sitemap: https://www.goodwalk.co.nz/sitemap.xml');
});
});