import { Test, TestingModule } from '@nestjs/testing';
import { HelloController } from './HelloController';
import { HelloModule } from './HelloModule';
import { HelloService } from './HelloService';

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

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

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

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

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