mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Use mixins to delete redundant code between Entity classes (no-changelog) (#6616)
* db entities don't need an ID before they are inserted * don't define constructors on entity classes, use repository.create instead * use mixins to reduce duplicate code in db entity classes
This commit is contained in:
committed by
GitHub
parent
e6903a87b5
commit
dc2ba743eb
@@ -9,7 +9,6 @@ import { toReportTitle } from '@/audit/utils';
|
||||
import { mockInstance } from '../shared/utils/';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { WorkflowEntity } from '@db/entities/WorkflowEntity';
|
||||
|
||||
const nodesAndCredentials = mockInstance(LoadNodesAndCredentials);
|
||||
nodesAndCredentials.getCustomDirectories.mockReturnValue([]);
|
||||
@@ -33,7 +32,7 @@ test('should report risky official nodes', async () => {
|
||||
}, {});
|
||||
|
||||
const promises = Object.entries(map).map(async ([nodeType, nodeId]) => {
|
||||
const details = new WorkflowEntity({
|
||||
const details = Db.collections.Workflow.create({
|
||||
name: 'My Test Workflow',
|
||||
active: false,
|
||||
connections: {},
|
||||
|
||||
Reference in New Issue
Block a user