add tests
This commit is contained in:
32
apps/api/src/domain/logging/LoggingModule.test.ts
Normal file
32
apps/api/src/domain/logging/LoggingModule.test.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user