diff options
author | Chris Rebert <code@rebertia.com> | 2015-02-24 09:41:08 +0300 |
---|---|---|
committer | Chris Rebert <code@rebertia.com> | 2015-02-24 09:43:17 +0300 |
commit | 9c75c855c6bba0e9ef9facc7c948612cd0c2a855 (patch) | |
tree | 6c9e9a7cb2897a684b38cd4e69193d4286564563 /js/tests/unit/tab.js | |
parent | 118b8c2695d026f1cad6cffc177d9672d9903ce9 (diff) |
JS unit tests: equal() => strictEqual()
[skip validator]
Diffstat (limited to 'js/tests/unit/tab.js')
-rw-r--r-- | js/tests/unit/tab.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index a76b4e0cd5..215178cc89 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -38,10 +38,10 @@ $(function () { $('<ul><li id="home"/><li id="profile"/></ul>').appendTo('#qunit-fixture') $(tabsHTML).find('li:last a').bootstrapTab('show') - assert.equal($('#qunit-fixture').find('.active').attr('id'), 'profile') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'profile') $(tabsHTML).find('li:first a').bootstrapTab('show') - assert.equal($('#qunit-fixture').find('.active').attr('id'), 'home') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') }) QUnit.test('should activate element by tab id', function (assert) { @@ -53,10 +53,10 @@ $(function () { $('<ul><li id="home"/><li id="profile"/></ul>').appendTo('#qunit-fixture') $(pillsHTML).find('li:last a').bootstrapTab('show') - assert.equal($('#qunit-fixture').find('.active').attr('id'), 'profile') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'profile') $(pillsHTML).find('li:first a').bootstrapTab('show') - assert.equal($('#qunit-fixture').find('.active').attr('id'), 'home') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') }) QUnit.test('should not fire shown when show is prevented', function (assert) { @@ -92,10 +92,10 @@ $(function () { .end() .find('ul > li:last a') .on('show.bs.tab', function (e) { - assert.equal(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') + assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') }) .on('shown.bs.tab', function (e) { - assert.equal(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') + assert.strictEqual(e.relatedTarget.hash, '#1-1', 'references correct element as relatedTarget') done() }) .bootstrapTab('show') @@ -166,10 +166,10 @@ $(function () { $(tabsHTML) .find('li:first a') .on('hide.bs.tab', function (e) { - assert.equal(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') + assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') }) .on('hidden.bs.tab', function (e) { - assert.equal(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') + assert.strictEqual(e.relatedTarget.hash, '#profile', 'references correct element as relatedTarget') done() }) .bootstrapTab('show') @@ -186,20 +186,20 @@ $(function () { var $tabs = $(tabsHTML).appendTo('#qunit-fixture') $tabs.find('li:first a').bootstrapTab('show') - assert.equal($tabs.find('.active a').attr('aria-expanded'), 'true', 'shown tab has aria-expanded = true') - assert.equal($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'hidden tab has aria-expanded = false') + assert.strictEqual($tabs.find('.active a').attr('aria-expanded'), 'true', 'shown tab has aria-expanded = true') + assert.strictEqual($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'hidden tab has aria-expanded = false') $tabs.find('li:last a').click() - assert.equal($tabs.find('.active a').attr('aria-expanded'), 'true', 'after click, shown tab has aria-expanded = true') - assert.equal($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'after click, hidden tab has aria-expanded = false') + assert.strictEqual($tabs.find('.active a').attr('aria-expanded'), 'true', 'after click, shown tab has aria-expanded = true') + assert.strictEqual($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'after click, hidden tab has aria-expanded = false') $tabs.find('li:first a').bootstrapTab('show') - assert.equal($tabs.find('.active a').attr('aria-expanded'), 'true', 'shown tab has aria-expanded = true') - assert.equal($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'hidden tab has aria-expanded = false') + assert.strictEqual($tabs.find('.active a').attr('aria-expanded'), 'true', 'shown tab has aria-expanded = true') + assert.strictEqual($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'hidden tab has aria-expanded = false') $tabs.find('li:first a').click() - assert.equal($tabs.find('.active a').attr('aria-expanded'), 'true', 'after second show event, shown tab still has aria-expanded = true') - assert.equal($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'after second show event, hidden tab has aria-expanded = false') + assert.strictEqual($tabs.find('.active a').attr('aria-expanded'), 'true', 'after second show event, shown tab still has aria-expanded = true') + assert.strictEqual($tabs.find('li:not(.active) a').attr('aria-expanded'), 'false', 'after second show event, hidden tab has aria-expanded = false') }) }) |