Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderallen-aa committed Dec 12, 2023
1 parent 5c63ca4 commit 52af800
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion packages/api/tests/api/expoJudgingSession/post.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const validatePayloadMock = getMock(validatePayload);

describe('expoJudgingSession post endpoint', () => {
it('should create an ExpoJudgingSession, add a createdBy, and return a 200', async () => {
validatePayloadMock.mockReturnValueOnce({ errorHandled: false , data:{ projectIds: ['1', '2'] } } as any);
validatePayloadMock.mockReturnValueOnce({
errorHandled: false,
data: { projectIds: ['1', '2'] },
} as any);
const mockAdmin = { user: { id: 1 } };
const req = createMockRequest({ admin: mockAdmin as any });
const { entityManager, admin } = req;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { fetchProjects } from '../../../ProjectsSelect/fetchProjects';
export const JudgingSessionOptionsButton: React.FC = () => {
const { addExpoJudgingSession } = useExpoJudgingSessionStore();
let expoJudgingSession: ExpoJudgingSession | undefined;
let projects:Project[] = [];

let projects: Project[] = [];
const tryFetchProjects = async () => {
try {
projects = await fetchProjects();
Expand All @@ -26,12 +26,12 @@ export const JudgingSessionOptionsButton: React.FC = () => {
});
}

return projects.map(({id}) => id);
return projects.map(({ id }) => id);
};

const tryPostExpoJudgingSession = async () => {
try {
await addExpoJudgingSession({projectIds: await tryFetchProjects()});
await addExpoJudgingSession({ projectIds: await tryFetchProjects() });
openSuccessToast({
title: 'Success!',
description: 'Expo Judging Session successfully created.',
Expand Down

0 comments on commit 52af800

Please sign in to comment.