test(core): Fix typing issues in tests (no-changelog) (#10244)

This commit is contained in:
Tomi Turtiainen
2024-07-30 21:24:01 +03:00
committed by GitHub
parent 5b47c8b57b
commit 3d23f2f333
18 changed files with 41 additions and 38 deletions

View File

@@ -41,6 +41,9 @@ export class InternalHooks {
private readonly sharedWorkflowRepository: SharedWorkflowRepository,
workflowStatisticsService: WorkflowStatisticsService,
private readonly projectRelationRepository: ProjectRelationRepository,
// Can't use @ts-expect-error because only dev time tsconfig considers this as an error, but not build time
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - needed until we decouple telemetry
private readonly _eventBus: MessageEventBus, // needed until we decouple telemetry
) {
workflowStatisticsService.on('telemetry.onFirstProductionWorkflowSuccess', (metrics) =>

View File

@@ -6,7 +6,6 @@ import type { MessageEventBusLogWriterOptions } from './MessageEventBusLogWriter
let logFileBasePath = '';
let loggingPaused = true;
let keepFiles = 10;
let fileStatTimer: NodeJS.Timer;
let maxLogFileSizeInKB = 102400;
function setLogFileBasePath(basePath: string) {
@@ -117,7 +116,7 @@ if (!isMainThread) {
if (logFileBasePath) {
renameAndCreateLogs();
loggingPaused = false;
fileStatTimer = setInterval(async () => {
setInterval(async () => {
await checkFileSize(buildLogFileNameWithCounter());
}, 5000);
}

View File

@@ -1,8 +1,16 @@
import { filterListQueryMiddleware } from './filter';
import { selectListQueryMiddleware } from './select';
import { paginationListQueryMiddleware } from './pagination';
import type { ListQuery } from '@/requests';
import type { NextFunction, Response } from 'express';
export const listQueryMiddleware = [
export type ListQueryMiddleware = (
req: ListQuery.Request,
res: Response,
next: NextFunction,
) => void;
export const listQueryMiddleware: ListQueryMiddleware[] = [
filterListQueryMiddleware,
selectListQueryMiddleware,
paginationListQueryMiddleware,