diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js
index 65a8f9e767..0d89d5f53d 100644
--- a/js/tests/unit/alert.js
+++ b/js/tests/unit/alert.js
@@ -56,7 +56,7 @@ $(function () {
''
var $alert = $(alertHTML).appendTo('#qunit-fixture').bootstrapAlert()
- assert.notEqual($('#qunit-fixture').find('.alert').length, 0, 'element added to dom')
+ assert.notStrictEqual($('#qunit-fixture').find('.alert').length, 0, 'element added to dom')
$alert
.one('closed.bs.alert', function () {
diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js
index 14cebe84f3..95c3340328 100644
--- a/js/tests/unit/modal.js
+++ b/js/tests/unit/modal.js
@@ -68,7 +68,7 @@ $(function () {
$('
')
.on('shown.bs.modal', function () {
- assert.notEqual($('#modal-test').length, 0, 'modal inserted into dom')
+ assert.notStrictEqual($('#modal-test').length, 0, 'modal inserted into dom')
done()
})
.bootstrapModal('show')
@@ -109,7 +109,7 @@ $(function () {
$('')
.on('shown.bs.modal', function () {
assert.ok($('#modal-test').is(':visible'), 'modal visible')
- assert.notEqual($('#modal-test').length, 0, 'modal inserted into dom')
+ assert.notStrictEqual($('#modal-test').length, 0, 'modal inserted into dom')
$(this).bootstrapModal('hide')
})
.on('hidden.bs.modal', function () {
@@ -126,7 +126,7 @@ $(function () {
$('')
.on('shown.bs.modal', function () {
assert.ok($('#modal-test').is(':visible'), 'modal visible')
- assert.notEqual($('#modal-test').length, 0, 'modal inserted into dom')
+ assert.notStrictEqual($('#modal-test').length, 0, 'modal inserted into dom')
$(this).bootstrapModal('toggle')
})
.on('hidden.bs.modal', function () {
@@ -143,7 +143,7 @@ $(function () {
$('
')
.on('shown.bs.modal', function () {
assert.ok($('#modal-test').is(':visible'), 'modal visible')
- assert.notEqual($('#modal-test').length, 0, 'modal inserted into dom')
+ assert.notStrictEqual($('#modal-test').length, 0, 'modal inserted into dom')
$(this).find('.close').trigger('click')
})
.on('hidden.bs.modal', function () {
@@ -175,7 +175,7 @@ $(function () {
$('')
.on('shown.bs.modal', function () {
- assert.notEqual($('#modal-test').length, 0, 'modal inserted into dom')
+ assert.notStrictEqual($('#modal-test').length, 0, 'modal inserted into dom')
$('.contents').trigger('click')
assert.ok($('#modal-test').is(':visible'), 'modal visible')
$('#modal-test').trigger('click')
diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js
index f4b04ded57..f4b29cc9e0 100644
--- a/js/tests/unit/popover.js
+++ b/js/tests/unit/popover.js
@@ -51,7 +51,7 @@ $(function () {
$('@mdo')
.appendTo('#qunit-fixture')
.on('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
$(this).bootstrapPopover('hide')
})
.on('hidden.bs.popover', function () {
@@ -95,7 +95,7 @@ $(function () {
$popover
.one('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
assert.strictEqual($('.popover .popover-header').text(), '@fat', 'title correctly inserted')
assert.strictEqual($('.popover .popover-body').text(), 'loves writing tests (╯°□°)╯︵ ┻━┻', 'content correctly inserted')
$popover.bootstrapPopover('hide')
@@ -121,7 +121,7 @@ $(function () {
$popover.bootstrapPopover('show')
- assert.notEqual($('.popover').length, 0, 'popover inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover inserted')
assert.strictEqual($('.popover .popover-header').text(), '@glebm <3 writing tests', 'title inserted')
assert.ok($.contains($('.popover').get(0), title), 'title node moved, not copied')
// toLowerCase because IE8 will return ...
@@ -142,7 +142,7 @@ $(function () {
$popover.bootstrapPopover('show')
- assert.notEqual($('.popover').length, 0, 'popover inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover inserted')
assert.strictEqual($('.popover .popover-header').text(), '@glebm <3 writing tests', 'title inserted')
assert.ok(!$.contains($('.popover').get(0), title), 'title node copied, not moved')
assert.strictEqual($('.popover .popover-body').html(), '¯\\_(ツ)_/¯', 'content inserted')
@@ -164,8 +164,8 @@ $(function () {
})
function popoverInserted() {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
- assert.equal($('.popover .popover-body').html(), $div[0].outerHTML, 'content correctly inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
+ assert.strictEqual($('.popover .popover-body').html(), $div[0].outerHTML, 'content correctly inserted')
}
$popover
@@ -195,7 +195,7 @@ $(function () {
.appendTo('#qunit-fixture')
.bootstrapPopover()
.one('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
assert.strictEqual($('.popover .popover-header').text(), '@mdo', 'title correctly inserted')
assert.strictEqual($('.popover .popover-body').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted')
$popover.bootstrapPopover('hide')
@@ -217,7 +217,7 @@ $(function () {
content: 'ignored content option'
})
.one('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
assert.strictEqual($('.popover .popover-header').text(), '@mdo', 'title correctly inserted')
assert.strictEqual($('.popover .popover-body').text(), 'loves data attributes (づ。◕‿‿◕。)づ ︵ ┻━┻', 'content correctly inserted')
$popover.bootstrapPopover('hide')
@@ -240,7 +240,7 @@ $(function () {
template: ''
})
.one('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
assert.ok($('.popover').hasClass('foobar'), 'custom class is present')
$popover.bootstrapPopover('hide')
})
@@ -282,7 +282,7 @@ $(function () {
trigger: 'click'
})
.one('shown.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
$div.find('a').trigger('click')
})
.one('hidden.bs.popover', function () {
@@ -352,7 +352,7 @@ $(function () {
$('@Johann-S')
.appendTo('#qunit-fixture')
.on('inserted.bs.popover', function () {
- assert.notEqual($('.popover').length, 0, 'popover was inserted')
+ assert.notStrictEqual($('.popover').length, 0, 'popover was inserted')
assert.ok(true, 'inserted event fired')
done()
})
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index 2149a68916..45c66a7f63 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -141,7 +141,7 @@ $(function () {
$tooltip
.one('shown.bs.tooltip', function () {
- assert.notEqual($('.tooltip b').length, 0, 'b tag was inserted')
+ assert.notStrictEqual($('.tooltip b').length, 0, 'b tag was inserted')
$tooltip.bootstrapTooltip('hide')
})
.one('hidden.bs.tooltip', function () {
@@ -163,7 +163,7 @@ $(function () {
$tooltip
.one('shown.bs.tooltip', function () {
- assert.notEqual($('.tooltip').length, 0, 'tooltip inserted')
+ assert.notStrictEqual($('.tooltip').length, 0, 'tooltip inserted')
assert.strictEqual($('.tooltip').text(), '<3 writing tests', 'title inserted')
assert.ok(!$.contains($('.tooltip').get(0), title), 'title node copied, not moved')
done()
@@ -184,7 +184,7 @@ $(function () {
$tooltip
.one('shown.bs.tooltip', function () {
- assert.notEqual($('.tooltip').length, 0, 'tooltip inserted')
+ assert.notStrictEqual($('.tooltip').length, 0, 'tooltip inserted')
assert.strictEqual($('.tooltip').text(), '<3 writing tests', 'title inserted')
assert.ok($.contains($('.tooltip').get(0), title), 'title node moved, not copied')
done()
@@ -244,7 +244,7 @@ $(function () {
$('')
.appendTo('#qunit-fixture')
.on('inserted.bs.tooltip', function () {
- assert.notEqual($('.tooltip').length, 0, 'tooltip was inserted')
+ assert.notStrictEqual($('.tooltip').length, 0, 'tooltip was inserted')
assert.ok(true, 'inserted event fired')
done()
})
@@ -403,7 +403,7 @@ $(function () {
$tooltip
.one('shown.bs.tooltip', function () {
- assert.notEqual($('body > .tooltip').length, 0, 'tooltip is direct descendant of body')
+ assert.notStrictEqual($('body > .tooltip').length, 0, 'tooltip is direct descendant of body')
assert.strictEqual($('#qunit-fixture > .tooltip').length, 0, 'tooltip is not in parent')
$tooltip.bootstrapTooltip('hide')
})
@@ -843,7 +843,7 @@ $(function () {
$.each(tests, function (idx, triggers) {
for (var i = 0, len = triggers.length; i < len; i++) {
$el.trigger(triggers[i])
- assert.equal(i < len - 1, showingTooltip())
+ assert.strictEqual(i < len - 1, showingTooltip())
}
})
})
diff --git a/js/tests/unit/util.js b/js/tests/unit/util.js
index 18a05b269f..20c1e6ba38 100644
--- a/js/tests/unit/util.js
+++ b/js/tests/unit/util.js
@@ -157,9 +157,9 @@ $(function () {
mode: 'open'
})
- assert.equal(shadowRoot, Util.findShadowRoot(shadowRoot))
+ assert.strictEqual(shadowRoot, Util.findShadowRoot(shadowRoot))
shadowRoot.innerHTML = ''
- assert.equal(shadowRoot, Util.findShadowRoot(shadowRoot.firstChild))
+ assert.strictEqual(shadowRoot, Util.findShadowRoot(shadowRoot.firstChild))
})
QUnit.test('Util.findShadowRoot should return null when attachShadow is not available', function (assert) {
@@ -167,7 +167,7 @@ $(function () {
var $div = $('').appendTo($('#qunit-fixture'))
if (!document.documentElement.attachShadow) {
- assert.equal(null, Util.findShadowRoot($div[0]))
+ assert.strictEqual(null, Util.findShadowRoot($div[0]))
} else {
var sandbox = sinon.createSandbox()
@@ -176,7 +176,7 @@ $(function () {
return $div
})
- assert.equal(null, Util.findShadowRoot($div[0]))
+ assert.strictEqual(null, Util.findShadowRoot($div[0]))
sandbox.restore()
}
})