import { describe, it, expect } from 'vitest';
import { baseNavItems, proNavItem, getNavItems } from '../app/dashboard/constants';

describe('getNavItems', () => {
  it('should return only base items for free users', () => {
    const items = getNavItems(false);
    expect(items).toHaveLength(2);
    expect(items).toEqual(baseNavItems);
  });

  it('should include pro item for pro users', () => {
    const items = getNavItems(true);
    expect(items).toHaveLength(3);
    expect(items).toContain(proNavItem);
  });

  it('should have correct structure for base items', () => {
    baseNavItems.forEach(item => {
      expect(item).toHaveProperty('label');
      expect(item).toHaveProperty('href');
      expect(item).toHaveProperty('icon');
    });
  });

  it('should have proOnly flag on proNavItem', () => {
    expect(proNavItem.proOnly).toBe(true);
  });
});
