refactor(core): Reduce boilterplate code in between tests 🧹, and fix the tests in node.js 20 (no-changelog) (#6654)

refactor(core): Reduce boilterplate code in between tests

also cleaned up some imports, and fixed the tests in node.js 20
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-13 10:14:48 +02:00
committed by GitHub
parent 3e07ffa73e
commit b895ba438a
78 changed files with 1197 additions and 1597 deletions

View File

@@ -1,11 +1,11 @@
import type { DeleteResult, FindOptionsWhere } from 'typeorm';
import { In, Not, Raw, LessThan } from 'typeorm';
import { Container } from 'typedi';
import type { ExecutionStatus } from 'n8n-workflow';
import * as Db from '@/Db';
import type { IExecutionBase, IExecutionFlattedDb } from '@/Interfaces';
import type { ExecutionStatus } from 'n8n-workflow';
import Container from 'typedi';
import { ExecutionRepository } from '@/databases/repositories';
import { ExecutionRepository } from '@db/repositories';
function getStatusCondition(status: ExecutionStatus) {
const condition: Pick<FindOptionsWhere<IExecutionFlattedDb>, 'status'> = {};

View File

@@ -1,9 +1,9 @@
import type express from 'express';
import { Container } from 'typedi';
import type { StatusResult } from 'simple-git';
import type { PublicSourceControlRequest } from '../../../types';
import { authorize } from '../../shared/middlewares/global.middleware';
import type { ImportResult } from '@/environments/sourceControl/types/importResult';
import Container from 'typedi';
import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee';
import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee';
import { isSourceControlLicensed } from '@/environments/sourceControl/sourceControlHelper.ee';

View File

@@ -1,4 +1,5 @@
import type express from 'express';
import { Container } from 'typedi';
import { clean, getAllUsersAndCount, getUser } from './users.service.ee';
@@ -10,7 +11,6 @@ import {
} from '../../shared/middlewares/global.middleware';
import type { UserRequest } from '@/requests';
import { InternalHooks } from '@/InternalHooks';
import Container from 'typedi';
export = {
getUser: [