import { describe, expect, it } from 'vitest';
import { renderRoute } from './prerender';

describe('agent-readable pages', () => {
  it('renders the landing page without a browser', () => {
    const html = renderRoute('/');
    expect(html).toContain('Polyform');
    expect(html).toContain('Your agents write');
  });

  it('renders direct documentation routes without JavaScript', () => {
    expect(renderRoute('/docs/create-project')).toContain('Fizz Buzz');
    expect(renderRoute('/docs/generate')).toContain('How candidates are pushed apart');
  });
});
