Fix frontend tests (#6585)

Fix a few broken tests
This commit is contained in:
Félix Malfait
2024-08-09 08:38:01 +02:00
committed by GitHub
parent ab12d9e8da
commit f2cc385710
17 changed files with 86 additions and 347 deletions

View File

@ -57,8 +57,8 @@ export const computePgGraphQLError = (
const error = errors[0];
const errorMessage = error?.message;
const mappedErrorKey = Object.keys(pgGraphQLErrorMapping).find(
(key) => errorMessage?.includes(key),
const mappedErrorKey = Object.keys(pgGraphQLErrorMapping).find((key) =>
errorMessage?.includes(key),
);
const mappedError = mappedErrorKey

View File

@ -405,9 +405,9 @@ export class TimelineMessagingService {
messageThreadIdsForWhichWorkspaceMemberIsNotInParticipants.includes(
messageThreadId,
)
? threadVisibilityByThreadIdForWhichWorkspaceMemberIsNotInParticipants?.[
? (threadVisibilityByThreadIdForWhichWorkspaceMemberIsNotInParticipants?.[
messageThreadId
] ?? MessageChannelVisibility.METADATA
] ?? MessageChannelVisibility.METADATA)
: MessageChannelVisibility.SHARE_EVERYTHING;
return threadVisibilityAcc;

View File

@ -63,9 +63,12 @@ export class MessageQueueCoreModule extends ConfigurableModuleClass {
const driverProvider: Provider = {
provide: QUEUE_DRIVER,
useFactory: async (...args: any[]) => {
const config = await options.useFactory!(...args);
if (options.useFactory) {
const config = await options.useFactory(...args);
return this.createDriver(config);
return this.createDriver(config);
}
throw new Error('useFactory is not defined');
},
inject: options.inject || [],
};