import { describe, expect, it } from 'bun:test';
import { renderToStaticMarkup } from 'react-dom/server';
import { ResearchMode } from './ResearchMode';

describe('ResearchMode', () => {
  it('renders empty state when no workspace is selected', () => {
    const html = renderToStaticMarkup(
      <ResearchMode
        workspaces={[]}
        activeWorkspaceId={null}
        navigationIntent={null}
        onSelectWorkspace={() => {}}
        onEnsureWorkspace={async () => null}
        onCaptureResearchNote={async () => {
          throw new Error('not used');
        }}
        onConsumeNavigationIntent={() => {}}
      />,
    );

    expect(html).toContain('No research workspace selected');
    expect(html).toContain('Quick capture');
  });
});
