import { Test, TestingModule } from '@nestjs/testing';
import { LeagueController } from './LeagueController';
import { LeagueModule } from './LeagueModule';
import { LeagueService } from './LeagueService';

describe('LeagueModule', () => {
  let module: TestingModule;

  beforeEach(async () => {
    module = await Test.createTestingModule({
      imports: [LeagueModule],
    }).compile();
  });

  it('should compile the module', () => {
    expect(module).toBeDefined();
  });

  it('should provide LeagueController', () => {
    const controller = module.get<LeagueController>(LeagueController);
    expect(controller).toBeDefined();
    expect(controller).toBeInstanceOf(LeagueController);
  });

  it('should provide LeagueService', () => {
    const service = module.get<LeagueService>(LeagueService);
    expect(service).toBeDefined();
    expect(service).toBeInstanceOf(LeagueService);
  });
});
