From 7b24f3c47c195b5519ddc2904840db98858ec015 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 25 Oct 2013 14:14:30 -0700 Subject: QUnit.equals() is deprecated; use QUnit.equal() instead --- js/tests/unit/tab.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index aede32abb..0db7cdb5b 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -26,10 +26,10 @@ $(function () { $('').appendTo("#qunit-fixture") $(tabsHTML).find('li:last a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "profile") + equal($("#qunit-fixture").find('.active').attr('id'), "profile") $(tabsHTML).find('li:first a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "home") + equal($("#qunit-fixture").find('.active').attr('id'), "home") }) test("should activate element by tab id", function () { @@ -42,10 +42,10 @@ $(function () { $('').appendTo("#qunit-fixture") $(pillsHTML).find('li:last a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "profile") + equal($("#qunit-fixture").find('.active').attr('id'), "profile") $(pillsHTML).find('li:first a').tab('show') - equals($("#qunit-fixture").find('.active').attr('id'), "home") + equal($("#qunit-fixture").find('.active').attr('id'), "home") }) @@ -77,9 +77,9 @@ $(function () { $(dropHTML).find('ul>li:first a').tab('show').end() .find('ul>li:last a').on('show', function(event){ - equals(event.relatedTarget.hash, "#1-1") + equal(event.relatedTarget.hash, "#1-1") }).on('shown', function(event){ - equals(event.relatedTarget.hash, "#1-1") + equal(event.relatedTarget.hash, "#1-1") }).tab('show') }) -- cgit v1.2.3 From 4aad52797c9ec43c30561f481f595be178f6ab94 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:20:59 +0200 Subject: Use a space after function consistently. --- js/tests/unit/tab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 0db7cdb5b..18aab7bd7 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -76,9 +76,9 @@ $(function () { + '' $(dropHTML).find('ul>li:first a').tab('show').end() - .find('ul>li:last a').on('show', function(event){ + .find('ul>li:last a').on('show', function (event){ equal(event.relatedTarget.hash, "#1-1") - }).on('shown', function(event){ + }).on('shown', function (event){ equal(event.relatedTarget.hash, "#1-1") }).tab('show') }) -- cgit v1.2.3 From 5e2ef69e1cc0ee62dfe1206f25030d1f89d9e50f Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 6 Dec 2013 12:23:08 +0200 Subject: Use a space before functions' bracket consistently. --- js/tests/unit/tab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 18aab7bd7..812262812 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -76,9 +76,9 @@ $(function () { + '' $(dropHTML).find('ul>li:first a').tab('show').end() - .find('ul>li:last a').on('show', function (event){ + .find('ul>li:last a').on('show', function (event) { equal(event.relatedTarget.hash, "#1-1") - }).on('shown', function (event){ + }).on('shown', function (event) { equal(event.relatedTarget.hash, "#1-1") }).tab('show') }) -- cgit v1.2.3 From eca8ff380388c1187bc2c86e0ae7fa80aa33111e Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 18 Sep 2013 19:50:02 +0300 Subject: Use single quotes consistently. --- js/tests/unit/tab.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'js/tests/unit/tab.js') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 812262812..6da7dc9a4 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -1,55 +1,55 @@ $(function () { - module("tabs") + module('tabs') - test("should provide no conflict", function () { + test('should provide no conflict', function () { var tab = $.fn.tab.noConflict() ok(!$.fn.tab, 'tab was set back to undefined (org value)') $.fn.tab = tab }) - test("should be defined on jquery object", function () { + test('should be defined on jquery object', function () { ok($(document.body).tab, 'tabs method is defined') }) - test("should return element", function () { + test('should return element', function () { ok($(document.body).tab()[0] == document.body, 'document.body returned') }) - test("should activate element by tab id", function () { + test('should activate element by tab id', function () { var tabsHTML = '' - $('
').appendTo("#qunit-fixture") + $('
').appendTo('#qunit-fixture') $(tabsHTML).find('li:last a').tab('show') - equal($("#qunit-fixture").find('.active').attr('id'), "profile") + equal($('#qunit-fixture').find('.active').attr('id'), 'profile') $(tabsHTML).find('li:first a').tab('show') - equal($("#qunit-fixture").find('.active').attr('id'), "home") + equal($('#qunit-fixture').find('.active').attr('id'), 'home') }) - test("should activate element by tab id", function () { + test('should activate element by tab id', function () { var pillsHTML = '' - $('
').appendTo("#qunit-fixture") + $('
').appendTo('#qunit-fixture') $(pillsHTML).find('li:last a').tab('show') - equal($("#qunit-fixture").find('.active').attr('id'), "profile") + equal($('#qunit-fixture').find('.active').attr('id'), 'profile') $(pillsHTML).find('li:first a').tab('show') - equal($("#qunit-fixture").find('.active').attr('id'), "home") + equal($('#qunit-fixture').find('.active').attr('id'), 'home') }) - test("should not fire closed when close is prevented", function () { + test('should not fire closed when close is prevented', function () { $.support.transition = false stop(); $('
') @@ -64,7 +64,7 @@ $(function () { .tab('show') }) - test("show and shown events should reference correct relatedTarget", function () { + test('show and shown events should reference correct relatedTarget', function () { var dropHTML = '
    ' + '