import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BaseTableComponent } from './base-table.component';
import { ApiService } from '../../../services/api/user-management.api.service';
import { NO_ERRORS_SCHEMA } from '@angular/core';

describe('BaseTableComponent', () => {
  let component: BaseTableComponent<any, any>;
  let fixture: ComponentFixture<BaseTableComponent<any, any>>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      declarations: [ BaseTableComponent ],
      providers: [
        {
          provide: ApiService,
          useValue: jasmine.createSpyObj('ApiService', ['getAll', 'update', 'delete'])
        }
      ],
      // Ignore any unknown elements and attributes
      schemas: [NO_ERRORS_SCHEMA]
    })
    .compileComponents();
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(BaseTableComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });

  // Add more tests here to cover other functionalities
});