fix(api): add clearAllMocks and explicit return type to GroupsModule

- Add jest.clearAllMocks() in beforeEach of both spec files to prevent
  call-history state from leaking between tests as the suites grow
- Define GroupSummary interface and use it as explicit return type for
  GroupsService.list() to satisfy TypeScript strict typing requirements

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 01:00:09 +05:30
parent 0e92b24bf0
commit f4a40b573e
3 changed files with 18 additions and 1 deletions
@@ -10,6 +10,10 @@ const mockService = { list: jest.fn().mockResolvedValue(mockGroups) };
describe('GroupsController', () => {
let controller: GroupsController;
beforeEach(() => {
jest.clearAllMocks();
});
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
controllers: [GroupsController],