Skip to content

Commit 890f25e

Browse files
committed
fix(event.test.ts): fix makeAttendeeRow return type annotation
1 parent e751645 commit 890f25e

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

apps/backend/src/__tests__/event.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Fastify from 'fastify';
1+
import Fastify,{LightMyRequestResponse} from 'fastify';
22
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
33

44
import { eventRoutes } from '../routes/event';
@@ -107,7 +107,7 @@ async function createEvent(
107107
app: FastifyInstance,
108108
body: Record<string, unknown>,
109109
authenticated = true,
110-
) {
110+
): Promise<LightMyRequestResponse> {
111111
return app.inject({
112112
method: 'POST',
113113
url: '/api/events',
@@ -488,7 +488,13 @@ describe('Events API', () => {
488488
/** Builds a raw EventAttendee row as Prisma returns it (with nested user) */
489489
function makeAttendeeRow(
490490
profile: typeof MOCK_USER_PROFILE | typeof MOCK_OTHER_USER_PROFILE,
491-
) {
491+
) : {
492+
id: string;
493+
userId: string;
494+
eventId: string;
495+
joinedAt: Date;
496+
user: typeof MOCK_USER_PROFILE | typeof MOCK_OTHER_USER_PROFILE;
497+
} {
492498
return {
493499
id: `attendee-${profile.id}`,
494500
userId: profile.id,

0 commit comments

Comments
 (0)