test: added test for addNode error

added test for addNode error thrown on unexpected node type

ref: N25B-114
This commit is contained in:
JGerla
2025-10-25 21:09:25 +02:00
parent 416025bf3f
commit 7b12ae1f5e
2 changed files with 4 additions and 11 deletions

View File

@@ -27,4 +27,7 @@ describe('Drag-and-Drop sidebar', () => {
expect(updatedState.nodes[0].id).toBe(`${nodeType}-0`);
expect(updatedState.nodes[1].id).toBe(`${nodeType}-1`);
});
test('throws error on unexpected node type', () => {
expect(() => addNode('I do not Exist', {x:100, y:100})).toThrow("Node I do not Exist not found");
})
});