Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user