From ef8c77d8dcebd13559a141e419d003c2d10cc5f3 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 27 Jul 2017 13:39:55 +0300 Subject: Tweak ESLint rules. --- js/tests/unit/alert.js | 2 +- js/tests/unit/button.js | 2 +- js/tests/unit/carousel.js | 10 +++++----- js/tests/unit/collapse.js | 2 +- js/tests/unit/dropdown.js | 4 ++-- js/tests/unit/modal.js | 8 ++++---- js/tests/unit/popover.js | 4 ++-- js/tests/unit/scrollspy.js | 2 +- js/tests/unit/tab.js | 2 +- js/tests/unit/tooltip.js | 6 +++--- 10 files changed, 21 insertions(+), 21 deletions(-) (limited to 'js/tests') diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index e078082c3..aee2b70d5 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -21,7 +21,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.alert, undefined, 'alert was set back to undefined (org value)') + assert.strictEqual(typeof $.fn.alert, 'undefined', 'alert was set back to undefined (org value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 489d400a6..e2a51bb4d 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -21,7 +21,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.button, undefined, 'button was set back to undefined (org value)') + assert.strictEqual(typeof $.fn.button, 'undefined', 'button was set back to undefined (org value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index b110fbd65..521b24ca4 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -21,7 +21,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') + assert.strictEqual(typeof $.fn.carousel, 'undefined', 'carousel was set back to undefined (orig value)') }) QUnit.test('should throw explicit error on undefined method', function (assert) { @@ -371,14 +371,14 @@ $(function () { var done = assert.async() $(template) .on('slid.bs.carousel', function (e) { - assert.ok(e.from !== undefined, 'from present') - assert.ok(e.to !== undefined, 'to present') + assert.ok(typeof e.from !== 'undefined', 'from present') + assert.ok(typeof e.to !== 'undefined', 'to present') $(this).off() done() }) .on('slide.bs.carousel', function (e) { - assert.ok(e.from !== undefined, 'from present') - assert.ok(e.to !== undefined, 'to present') + assert.ok(typeof e.from !== 'undefined', 'from present') + assert.ok(typeof e.to !== 'undefined', 'to present') $(this).off('slide.bs.carousel') }) .bootstrapCarousel('next') diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 0e9e8b6a7..4470a18c2 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -21,7 +21,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.collapse, undefined, 'collapse was set back to undefined (org value)') + assert.strictEqual(typeof $.fn.collapse, 'undefined', 'collapse was set back to undefined (org value)') }) QUnit.test('should throw explicit error on undefined method', function (assert) { diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index e44e47bbc..0b808cc48 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -21,7 +21,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.dropdown, undefined, 'dropdown was set back to undefined (org value)') + assert.strictEqual(typeof $.fn.dropdown, 'undefined', 'dropdown was set back to undefined (org value)') }) QUnit.test('should throw explicit error on undefined method', function (assert) { @@ -644,7 +644,7 @@ $(function () { $triggerDropdown .parent('.dropdown') .on('shown.bs.dropdown', function () { - assert.ok($dropdownMenu.attr('style') === undefined, 'No inline style applied by Popper.js') + assert.ok(typeof $dropdownMenu.attr('style') === 'undefined', 'No inline style applied by Popper.js') done() }) $triggerDropdown.trigger($.Event('click')) diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index fc6c4f38c..09c352443 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -34,7 +34,7 @@ $(function () { QUnit.test('should provide no conflict', function (assert) { assert.expect(1) - assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') + assert.strictEqual(typeof $.fn.modal, 'undefined', 'modal was set back to undefined (orig value)') }) QUnit.test('should throw explicit error on undefined method', function (assert) { @@ -380,7 +380,7 @@ $(function () { $('