From 1360a3fca54ddccc1a44a966cd199764179c0a39 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 29 Nov 2020 16:23:40 +0200 Subject: [PATCH] More --- js/tests/unit/dropdown.js | 8 ++++---- js/tests/unit/popover.js | 4 ++-- js/tests/unit/tooltip.js | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index 314ad1ab6cf5..896f2394b359 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -553,10 +553,10 @@ $(function () { $dropdown.parent('.dropdown') .on('hide.bs.dropdown', function (e) { - assert.notOk(e.clickEvent) + assert.strictEqual(typeof e.clickEvent, 'undefined') }) .on('hidden.bs.dropdown', function (e) { - assert.notOk(e.clickEvent) + assert.strictEqual(typeof e.clickEvent, 'undefined') }) .on('shown.bs.dropdown', function () { assert.ok(true, 'shown was fired') @@ -1163,7 +1163,7 @@ $(function () { dropdown.update() - assert.notOk(dropdown._popper) + assert.strictEqual(dropdown._popper, null) assert.true(spyDetectNavbar.called) }) @@ -1216,7 +1216,7 @@ $(function () { var dropdown = $dropdown.data('bs.dropdown') - assert.notOk(dropdown._popper) + assert.strictEqual(dropdown._popper, null) assert.notStrictEqual(dropdown._menu, null) assert.notStrictEqual(dropdown._element, null) diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index 2f0cf479e7e9..45679e9e0552 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -283,8 +283,8 @@ $(function () { assert.false($popover.hasClass('show'), 'popover is hidden') assert.strictEqual(typeof $popover.data('popover'), 'undefined', 'popover does not have data') assert.strictEqual($._data($popover[0], 'events').click[0].namespace, 'foo', 'popover still has click.foo') - assert.notOk($._data($popover[0], 'events').mouseover, 'popover does not have mouseover event') - assert.notOk($._data($popover[0], 'events').mouseout, 'popover does not have mouseout event') + assert.strictEqual(typeof $._data($popover[0], 'events').mouseover, 'undefined', 'popover does not have mouseover event') + assert.strictEqual(typeof $._data($popover[0], 'events').mouseout, 'undefined', 'popover does not have mouseout event') }) QUnit.test('should render popover element using delegated selector', function (assert) { diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 9c59e88a44ad..e1b612783948 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -348,8 +348,8 @@ $(function () { assert.false($tooltip.hasClass('show'), 'tooltip is hidden') assert.strictEqual(typeof $._data($tooltip[0], 'bs.tooltip'), 'undefined', 'tooltip does not have data') assert.strictEqual($._data($tooltip[0], 'events').click[0].namespace, 'foo', 'tooltip still has click.foo') - assert.notOk($._data($tooltip[0], 'events').mouseover, 'tooltip does not have mouseover event') - assert.notOk($._data($tooltip[0], 'events').mouseout, 'tooltip does not have mouseout event') + assert.strictEqual(typeof $._data($tooltip[0], 'events').mouseover, 'undefined', 'tooltip does not have mouseover event') + assert.strictEqual(typeof $._data($tooltip[0], 'events').mouseout, 'undefined', 'tooltip does not have mouseout event') }) QUnit.test('should show tooltip when toggle is called', function (assert) {