import { describe, expect, it } from 'vitest';
import { PUBLIC_SHARED_TABS, isPublicSharedTab } from './sharedTabs';

describe('shared public tab selection', () => {
  it('exposes exactly overview and files', () => {
    expect([...PUBLIC_SHARED_TABS]).toEqual(['overview', 'files']);
  });

  it('marks overview and files as public', () => {
    expect(isPublicSharedTab('overview')).toBe(true);
    expect(isPublicSharedTab('files')).toBe(true);
  });

  it('never exposes internal tabs (trace/browser/console)', () => {
    for (const tab of ['trace', 'browser', 'ssh', 'console', 'activity']) {
      expect(isPublicSharedTab(tab), tab).toBe(false);
    }
  });
});
