From 1bf5abab3153159d09f83f5512735da2144394d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zlatan=20Vasovi=C4=87?= Date: Thu, 19 Dec 2013 15:32:37 +0100 Subject: No leading pluses --- js/tests/unit/alert.js | 16 ++-- js/tests/unit/dropdown.js | 187 ++++++++++++++++++++++----------------------- js/tests/unit/scrollspy.js | 19 +++-- js/tests/unit/tab.js | 35 ++++----- 4 files changed, 126 insertions(+), 131 deletions(-) (limited to 'js/tests') diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 3fe2e70a3..b88b95fee 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -17,10 +17,10 @@ $(function () { }) test('should fade element out on clicking .close', function () { - var alertHTML = '
' - + '×' - + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' - + '
', + var alertHTML = '
' + + '×' + + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' + + '
', alert = $(alertHTML).alert() alert.find('.close').click() @@ -31,10 +31,10 @@ $(function () { test('should remove element when clicking .close', function () { $.support.transition = false - var alertHTML = '
' - + '×' - + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' - + '
', + var alertHTML = '
' + + '×' + + '

Holy guacamole! Best check yo self, you\'re not looking too good.

' + + '
', alert = $(alertHTML).appendTo('#qunit-fixture').alert() ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom') diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index 34e11de1c..b358b7387 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -18,68 +18,68 @@ $(function () { }) test('should not open dropdown if target is disabled', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click() ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') }) test('should not open dropdown if target is disabled', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click() ok(!dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') }) test('should add class open to menu if clicked', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click() ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') }) test('should test if element has a # before assuming it\'s a selector', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').dropdown().click() ok(dropdown.parent('.dropdown').hasClass('open'), 'open class added on click') @@ -87,17 +87,17 @@ $(function () { test('should remove open class if body clicked', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML) .appendTo('#qunit-fixture') .find('[data-toggle="dropdown"]') @@ -111,23 +111,22 @@ $(function () { }) test('should remove open class if body clicked, with multiple drop downs', function () { - var dropdownHTML = - '' - + '
' - + ' ' - + ' ' - + ' ' - + '
', + var dropdownHTML = '' + + '
' + + ' ' + + ' ' + + ' ' + + '
', dropdowns = $(dropdownHTML).appendTo('#qunit-fixture').find('[data-toggle="dropdown"]'), first = dropdowns.first(), last = dropdowns.last() @@ -150,17 +149,17 @@ $(function () { }) test('should fire show and hide event', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML) .appendTo('#qunit-fixture') .find('[data-toggle="dropdown"]') @@ -184,17 +183,17 @@ $(function () { test('should fire shown and hiden event', function () { - var dropdownHTML = '', + var dropdownHTML = '', dropdown = $(dropdownHTML) .appendTo('#qunit-fixture') .find('[data-toggle="dropdown"]') diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index ffc3d9a46..cf7b50dc4 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -19,16 +19,15 @@ $(function () { test('should switch active class on scroll', function () { var sectionHTML = '
' $section = $(sectionHTML).append('#qunit-fixture'), - topbarHTML = '
' - + '
' - + '
' - + '

Bootstrap

' - + '' - + '
' - + '
' - + '
', + topbarHTML = '
' + + '
' + + '
' + + '

Bootstrap

' + + '
  • Overview
  • ' + + '' + + '
    ' + + '
    ' + + '
    ', $topbar = $(topbarHTML).scrollspy() ok($topbar.find('.active', true)) diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 6da7dc9a4..59bedf391 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -17,11 +17,10 @@ $(function () { }) test('should activate element by tab id', function () { - var tabsHTML = - '' + var tabsHTML = '' $('').appendTo('#qunit-fixture') @@ -33,11 +32,10 @@ $(function () { }) test('should activate element by tab id', function () { - var pillsHTML = - '' + var pillsHTML = '' $('').appendTo('#qunit-fixture') @@ -65,15 +63,14 @@ $(function () { }) test('show and shown events should reference correct relatedTarget', function () { - var dropHTML = - '' + var dropHTML = '' $(dropHTML).find('ul>li:first a').tab('show').end() .find('ul>li:last a').on('show', function (event) { -- cgit v1.2.3