import { SelectedTabsPipe } from './selected-tabs.pipe';
import { TabSelectionOption } from './tab-selection-options.model';

describe('SelectedTabsPipe', () => {
  let pipe: SelectedTabsPipe;

  beforeEach(() => {
    pipe = new SelectedTabsPipe();
  });

  it('should return all active tabs', () => {
    const tabs: TabSelectionOption[] = [
      {
        name: 'Tab_1',
        selected: false,
      },
      {
        name: 'Tab_2',
        selected: true,
      },
      {
        name: 'Tab_3',
        selected: false,
      },
    ];

    const result = pipe.transform(tabs);

    expect(result).toEqual([
      {
        name: 'Tab_2',
        selected: true,
      },
    ]);
  });
});
