Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
g-pooja-03 committed Dec 2, 2024
1 parent d3e57fb commit 5c855da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/tests/community.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('Community Controller', () => {
expect(response.body.message).toBe('Community not found');
});

it('should return 500 if an error occurs while removing the user from all communities', async () => {
it('should return 500 if error occurs while removing user from all communities', async () => {
(CommunityModel.find as jest.Mock).mockResolvedValue(mockCommunities);
(CommunityModel.updateMany as jest.Mock).mockRejectedValue(new Error('Database error'));

Expand All @@ -195,7 +195,7 @@ describe('Community Controller', () => {
expect(response.body.error).toBe('Failed to add user to community');
});

it('should return 500 if an error occurs while adding the user to the new community', async () => {
it('should return 500 if an error occurs while adding user to the new community', async () => {
(CommunityModel.find as jest.Mock).mockResolvedValue(mockCommunities);
(CommunityModel.updateMany as jest.Mock).mockResolvedValue({});
(CommunityModel.findOneAndUpdate as jest.Mock).mockRejectedValue(new Error('Database error'));
Expand Down Expand Up @@ -342,7 +342,7 @@ describe('Community Controller', () => {
jest.clearAllMocks();
});

it('should updated questions and return updatedCommunity when populatedCommunity exists', async () => {
it('should updated questions and return updatedCommunity', async () => {
(QuestionModel.findById as jest.Mock).mockResolvedValue(mockQuestion);
(CommunityModel.findOneAndUpdate as jest.Mock).mockResolvedValue(mockCommunity);
(CommunityModel.findOne as jest.Mock).mockResolvedValue({
Expand Down

0 comments on commit 5c855da

Please sign in to comment.