test: test for the actual better clone- and make sure we use the JSON stringify and parse for this since tests are weird

ref: N25B-371
This commit is contained in:
Björn Otgaar
2025-12-02 14:12:35 +01:00
parent 7640c32830
commit fe13017f2d
4 changed files with 63 additions and 37 deletions

View File

@@ -15,7 +15,7 @@ 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 defaultData = JSON.parse(JSON.stringify(NodeDefaults[type as keyof typeof NodeDefaults]))
const newData = {
id: id,
type: type,