fix: fix the tests and creation of nodes.

ref: N25B-408
This commit is contained in:
Björn Otgaar
2025-12-15 12:09:53 +01:00
parent f22fe38e22
commit 757435e9f8
2 changed files with 21 additions and 17 deletions

View File

@@ -15,14 +15,16 @@ describe('NormNode', () => {
function createNode(id: string, type: string, position: XYPosition, data: Record<string, unknown>, deletable?: boolean) {
const defaultData = NodeDefaults[type as keyof typeof NodeDefaults]
const newData = {
id: id,
type: type,
position: position,
data: data,
deletable: deletable,
return {
id,
type,
position,
deletable,
data: {
...defaultData,
...data,
},
}
return {...defaultData, ...newData}
}