diff options
author | Alessandro Chitolina <alekitto@gmail.com> | 2017-09-21 19:04:47 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-02-20 23:05:45 +0300 |
commit | cc6e130fc1c6f794fcdb24737cb584ac2c937d33 (patch) | |
tree | e303b1b069e2cff03fbaf11c927ca05ce94e8849 /js/tests/unit/dom | |
parent | 7c1d0a1097657fb604a69cd47375a7e94c0ced93 (diff) |
tooltip without jquery
Diffstat (limited to 'js/tests/unit/dom')
-rw-r--r-- | js/tests/unit/dom/eventHandler.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/tests/unit/dom/eventHandler.js b/js/tests/unit/dom/eventHandler.js index 0730e38468..7404d6c32b 100644 --- a/js/tests/unit/dom/eventHandler.js +++ b/js/tests/unit/dom/eventHandler.js @@ -254,4 +254,18 @@ $(function () { EventHandler.trigger(element, 'click') document.body.removeChild(element) }) + + QUnit.test('off should remove a listener registered by .one', function (assert) { + assert.expect(0) + + var element = document.createElement('div') + var handler = function () { + assert.notOk(true, 'listener called') + } + + EventHandler.one(element, 'foobar', handler) + EventHandler.off(element, 'foobar', handler) + + EventHandler.trigger(element, 'foobar') + }) }) |