0a9588abb7
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
23 lines
617 B
TypeScript
23 lines
617 B
TypeScript
import { Test, TestingModule } from '@nestjs/testing';
|
|
import { AppController } from './app.controller';
|
|
import { AppService } from './app.service';
|
|
|
|
describe('AppController', () => {
|
|
let appController: AppController;
|
|
|
|
beforeEach(async () => {
|
|
const app: TestingModule = await Test.createTestingModule({
|
|
controllers: [AppController],
|
|
providers: [AppService],
|
|
}).compile();
|
|
|
|
appController = app.get<AppController>(AppController);
|
|
});
|
|
|
|
describe('root', () => {
|
|
it('should return "Hello World!"', () => {
|
|
expect(appController.getHello()).toBe('Hello World!');
|
|
});
|
|
});
|
|
});
|