Skip to content

Commit

Permalink
test: add more edge cases for remove-event-listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
chessurisme committed Aug 1, 2024
1 parent 54856a8 commit 9ea78b8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ describe('removeEventListeners', () => {

spyConsoleError.mockRestore()
})

it('should handle elements with no event listeners attached', () => {
const element = document.createElement('div')
const events = [{ type: 'click', func: () => {} }]
const result = removeEventListeners(element, events)
expect(result).toBe(true)
})
})

0 comments on commit 9ea78b8

Please sign in to comment.