Skip to content

Commit

Permalink
Revert addition of test
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker authored Aug 22, 2024
1 parent c232518 commit b266104
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions test/core/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Core htmx Events', function() {
}
})

it('events accept an options argument', function() {
it('events accept an options argument and the result works as expected', function() {
var invoked = 0
var handler = htmx.on('custom', function() {
invoked = invoked + 1
Expand All @@ -92,25 +92,6 @@ describe('Core htmx Events', function() {
}
})

it('events accept a useCapture argument', function() {
var invoked = []
var callable = function(evt) {
invoked.push(evt.target.tagName)
}
try {
var parent = make("<div hx-post='/test'></div>")
var child = make("<span hx-post='/test'></span>")
parent.appendChild(child)
var parentHandler = htmx.on(parent, 'custom', callable, true)
var childHandler = htmx.on(child, 'custom', callable)
htmx.trigger(child, 'custom')
invoked.should.equal(['div', 'span'])
} finally {
htmx.off('custom', parentHandler)
htmx.off('custom', childHandler)
}
})

it('htmx:configRequest allows attribute removal', function() {
var param = 'foo'
var handler = htmx.on('htmx:configRequest', function(evt) {
Expand Down

0 comments on commit b266104

Please sign in to comment.