30 lines
889 B
TypeScript
30 lines
889 B
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { MediaModule } from './MediaModule';
|
|
import { MediaController } from './MediaController';
|
|
import { MediaService } from './MediaService';
|
|
|
|
describe('MediaModule', () => {
|
|
let module: TestingModule;
|
|
|
|
beforeEach(async () => {
|
|
module = await Test.createTestingModule({
|
|
imports: [MediaModule],
|
|
}).compile();
|
|
});
|
|
|
|
it('should compile the module', () => {
|
|
expect(module).toBeDefined();
|
|
});
|
|
|
|
it('should provide MediaController', () => {
|
|
const controller = module.get<MediaController>(MediaController);
|
|
expect(controller).toBeDefined();
|
|
expect(controller).toBeInstanceOf(MediaController);
|
|
});
|
|
|
|
it('should provide MediaService', () => {
|
|
const service = module.get<MediaService>(MediaService);
|
|
expect(service).toBeDefined();
|
|
expect(service).toBeInstanceOf(MediaService);
|
|
});
|
|
}); |