aboutsummaryrefslogtreecommitdiff
path: root/js/tests
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2017-07-27 13:39:55 +0300
committerXhmikosR <[email protected]>2017-08-23 00:05:38 +0300
commitef8c77d8dcebd13559a141e419d003c2d10cc5f3 (patch)
treefa0efba9d60de5570eeac2b7ae0262916d64401d /js/tests
parent0492c3a4cd0aed19f46c5472a54ee8700c1a328e (diff)
downloadbootstrap-ef8c77d8dcebd13559a141e419d003c2d10cc5f3.tar.xz
bootstrap-ef8c77d8dcebd13559a141e419d003c2d10cc5f3.zip
Tweak ESLint rules.
Diffstat (limited to 'js/tests')
-rw-r--r--js/tests/unit/alert.js2
-rw-r--r--js/tests/unit/button.js2
-rw-r--r--js/tests/unit/carousel.js10
-rw-r--r--js/tests/unit/collapse.js2
-rw-r--r--js/tests/unit/dropdown.js4
-rw-r--r--js/tests/unit/modal.js8
-rw-r--r--js/tests/unit/popover.js4
-rw-r--r--js/tests/unit/scrollspy.js2
-rw-r--r--js/tests/unit/tab.js2
-rw-r--r--js/tests/unit/tooltip.js6
10 files changed, 21 insertions, 21 deletions
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 () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
- assert.strictEqual($body.data('padding-right'), undefined, 'data-padding-right should be cleared after closing')
+ assert.strictEqual(typeof $body.data('padding-right'), 'undefined', 'data-padding-right should be cleared after closing')
$body.removeAttr('style')
done()
})
@@ -422,7 +422,7 @@ $(function () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
- assert.strictEqual($element.data('padding-right'), undefined, 'data-padding-right should be cleared after closing')
+ assert.strictEqual(typeof $element.data('padding-right'), 'undefined', 'data-padding-right should be cleared after closing')
$element.remove()
done()
})
@@ -464,7 +464,7 @@ $(function () {
$('<div id="modal-test"/>')
.on('hidden.bs.modal', function () {
- assert.strictEqual($element.data('margin-right'), undefined, 'data-margin-right should be cleared after closing')
+ assert.strictEqual(typeof $element.data('margin-right'), 'undefined', 'data-margin-right should be cleared after closing')
$element.remove()
done()
})
diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js
index f9c1b429d..a06c1b1a2 100644
--- a/js/tests/unit/popover.js
+++ b/js/tests/unit/popover.js
@@ -22,7 +22,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
- assert.strictEqual($.fn.popover, undefined, 'popover was set back to undefined (org value)')
+ assert.strictEqual(typeof $.fn.popover, 'undefined', 'popover was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -304,7 +304,7 @@ $(function () {
assert.ok(false, 'should not fire any popover events')
})
.bootstrapPopover('hide')
- assert.strictEqual($popover.data('bs.popover'), undefined, 'should not initialize the popover')
+ assert.strictEqual(typeof $popover.data('bs.popover'), 'undefined', 'should not initialize the popover')
})
QUnit.test('should fire inserted event', function (assert) {
diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js
index a6a72e7a6..96cf54eef 100644
--- a/js/tests/unit/scrollspy.js
+++ b/js/tests/unit/scrollspy.js
@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
- assert.strictEqual($.fn.scrollspy, undefined, 'scrollspy was set back to undefined (org value)')
+ assert.strictEqual(typeof $.fn.scrollspy, 'undefined', 'scrollspy was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js
index 6f52e4042..3093299b0 100644
--- a/js/tests/unit/tab.js
+++ b/js/tests/unit/tab.js
@@ -21,7 +21,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
- assert.strictEqual($.fn.tab, undefined, 'tab was set back to undefined (org value)')
+ assert.strictEqual(typeof $.fn.tab, 'undefined', 'tab was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index c0cafefe5..89d5b70e8 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -22,7 +22,7 @@ $(function () {
QUnit.test('should provide no conflict', function (assert) {
assert.expect(1)
- assert.strictEqual($.fn.tooltip, undefined, 'tooltip was set back to undefined (org value)')
+ assert.strictEqual(typeof $.fn.tooltip, 'undefined', 'tooltip was set back to undefined (org value)')
})
QUnit.test('should throw explicit error on undefined method', function (assert) {
@@ -382,7 +382,7 @@ $(function () {
.on('inserted.bs.tooltip', function () {
var $tooltip = $($(this).data('bs.tooltip').tip)
assert.ok($tooltip.hasClass('bs-tooltip-right'))
- assert.ok($tooltip.attr('style') === undefined)
+ assert.ok(typeof $tooltip.attr('style') === 'undefined')
$styles.remove()
done()
})
@@ -701,7 +701,7 @@ $(function () {
assert.ok(false, 'should not fire any tooltip events')
})
.bootstrapTooltip('hide')
- assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip')
+ assert.strictEqual(typeof $tooltip.data('bs.tooltip'), 'undefined', 'should not initialize the tooltip')
})
QUnit.test('should not remove tooltip if multiple triggers are set and one is still active', function (assert) {