test: add coverage for removeEventListener boolean capture · nodejs/node@5c680a5 · GitHub
Skip to content

Commit 5c680a5

Browse files
lazergaduh95
authored andcommitted
test: add coverage for removeEventListener boolean capture
removeEventListener(type, fn, true) never matched a listener added the same way, because removeEventListener compared options?.capture === true directly while addEventListener flattened a boolean third argument via validateEventListenerOptions(). The underlying fix landed independently in #64894 (worker: add support for Web Workers), as a side effect of an unrelated refactor, so this PR now only adds the regression test that would have caught it. WPT does not cover this path: the EventTarget-removeEventListener.any.js test is skipped in test/wpt/status/dom/events.json. Fixes: #65244 Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com> PR-URL: #65245 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent e6b34e6 commit 5c680a5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎test/parallel/test-eventtarget.js‎

Lines changed: 14 additions & 0 deletions

0 commit comments

Comments
 (0)