Skip to content

Commit

Permalink
codacy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaMulein committed Sep 23, 2024
1 parent f2a14d2 commit 3664151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/duality-social-node/src/controllers/api/feed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ app.use('/api/feed', feedRouter);

// 4. Begin test suite
describe('FeedController - newPost', () => {
let originalConsoleError: any;
let originalConsoleError: typeof console.error;
let authToken: ISignedToken;

let roles: IRoleDocument[];
Expand Down Expand Up @@ -735,7 +735,7 @@ describe('FeedController - newPost', () => {

jest.spyOn(PostModel, 'findById').mockReturnValue({
exec: jest.fn().mockResolvedValue(null),
} as { exec: jest.Mock<any, any, any> });
} as { exec: jest.Mock<unknown, any, any> });

await FeedControllerInstance.newPost(
mockRequest as MulterRequest,
Expand All @@ -751,7 +751,7 @@ describe('FeedController - newPost', () => {
it('should handle non-existing parentViewpointId', async () => {
jest.spyOn(PostViewpointModel, 'findById').mockReturnValue({
exec: jest.fn().mockResolvedValue(null),
} as any);
} as { exec: jest.Mock<any, any, any> });

await FeedControllerInstance.newPost(
mockRequest as MulterRequest,
Expand Down
2 changes: 1 addition & 1 deletion apps/duality-social-node/src/mocks/create-mock-document.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Document, Types, SaveOptions } from 'mongoose';
import { mock, MockProxy } from 'jest-mock-extended';

export function convertDatesToISOStrings(obj: unknown): any {
export function convertDatesToISOStrings(obj: unknown): unknown {
if (obj instanceof Date) {
return obj.toISOString();
} else if (Array.isArray(obj)) {
Expand Down

0 comments on commit 3664151

Please sign in to comment.