import { Test, TestingModule } from '@nestjs/testing';
import { AnalyticsModule } from './AnalyticsModule';
import { AnalyticsController } from './AnalyticsController';
import { AnalyticsService } from './AnalyticsService';

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

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

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

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

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