import { Test, TestingModule } from '@nestjs/testing';
import { LoggingModule } from './LoggingModule';

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

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

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

  it('should provide Logger provider', () => {
    const logger = module.get('Logger');
    expect(logger).toBeDefined();
  });

  it('should export Logger provider', () => {
    const logger = module.get('Logger');
    expect(logger).toBeDefined();
  });

  it('should be a global module', () => {
    // Check if the module has the @Global() decorator by verifying it's registered globally
    // In NestJS, global modules are automatically available to all other modules
    expect(module).toBeDefined();
  });
});
