Conversation
| const data = userDoc.data() | ||
| return { | ||
| id: userDoc.id, | ||
| displayName: data?.displayName, |
|
|
||
| const mockOrganization = ( | ||
| organization?: Partial<OrganizationDBEntity>, | ||
| users?: any[] |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateSpec: vi.fn() as unknown as any, | ||
| AggregateSpecData: vi.fn(), | ||
| AggregateType: vi.fn() as unknown as any, | ||
| BulkWriter: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateQuerySnapshot: vi.fn() as unknown as any, | ||
| AggregateSpec: vi.fn() as unknown as any, | ||
| AggregateSpecData: vi.fn(), | ||
| AggregateType: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| AggregateField: vi.fn() as unknown as any, | ||
| AggregateQuery: vi.fn() as unknown as any, | ||
| AggregateQuerySnapshot: vi.fn() as unknown as any, | ||
| AggregateSpec: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| getFirestore: firestoreStub(database), | ||
| initializeFirestore: vi.fn(), | ||
| AggregateField: vi.fn() as unknown as any, | ||
| AggregateQuery: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| return { | ||
| getFirestore: firestoreStub(database), | ||
| initializeFirestore: vi.fn(), | ||
| AggregateField: vi.fn() as unknown as any, |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| return firestoreConstructor | ||
| } | ||
|
|
||
| export const mockFirebaseAdminApp = (database: { [key: string]: any }) => { |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| bulkWriter: () => void | ||
| bundle: () => void | ||
| } { | ||
| return new FakeFirestore(database) as any |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| import { vi } from 'vitest' | ||
| import { FakeFirestore } from 'firestore-vitest' | ||
|
|
||
| const firestoreStub = (database: { [key: string]: any }) => { |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
open-feedback
|
||||||||||||||||||||||||||||
| Project |
open-feedback
|
| Branch Review |
api
|
| Run status |
|
| Run duration | 02m 39s |
| Commit |
|
| Committer | Hugo Gresse |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
1
|
|
|
0
|
|
|
0
|
|
|
14
|
| View all changes introduced in this branch ↗︎ | |
| // Get API key from header | ||
| const apiKeyHeader = request.headers['x-api-key'] | ||
| const apiKeyParam = | ||
| typeof apiKeyHeader === 'string' ? apiKeyHeader : apiKeyHeader?.[0] |
| import { mockFirebaseAdminApp } from '../../testUtils/firestoreMock' | ||
|
|
||
| describe('/organizations/me', () => { | ||
| let fastify: any |
There was a problem hiding this comment.
Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
| * This plugin adds Swagger documentation to the API | ||
| */ | ||
| export const openAPIPlugin = fastifyPlugin(async (fastify: FastifyInstance) => { | ||
| console.log('isNodeEnvDev', isNodeEnvDev, isNodeEnvTest) |
There was a problem hiding this comment.
Unexpected console statement no-console
Add a real API with either an organization API Key or an event API Key !
API Keys are available:
Endpoint added in this PR:
to test / todo :
Linked to #1454
this API will be made in multiple PR