Skip to content

Commit d2bd5fd

Browse files
committed
Add test that onMouseDown isn't overwritten
1 parent f809ff5 commit d2bd5fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests-ui/tests/litegraph/core/LGraphNode.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,5 +621,10 @@ describe('LGraphNode', () => {
621621
expect(node.getInputSlotPos(inputSlot)).toEqual([expectedX, expectedY])
622622
delete (node.constructor as any).slot_start_y
623623
})
624+
test('should not overwrite onMouseDown prototype', () => {
625+
expect(Object.prototype.hasOwnProperty.call(node, 'onMouseDown')).toEqual(
626+
false
627+
)
628+
})
624629
})
625630
})

0 commit comments

Comments
 (0)