diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 755d9d1e550c..1de46e06fd23 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -46,15 +46,15 @@ $(function () { test('should not fire closed when close is prevented', function () { $.support.transition = false - stop(); + stop() $('
') .on('close.bs.alert', function (e) { - e.preventDefault(); - ok(true); - start(); + e.preventDefault() + ok(true) + start() }) .on('closed.bs.alert', function () { - ok(false); + ok(false) }) .alert('close') }) diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 6851e17a5ede..6f69855c7736 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -21,12 +21,12 @@ $(function () { stop() $('') .on('slide.bs.carousel', function (e) { - e.preventDefault(); - ok(true); - start(); + e.preventDefault() + ok(true) + start() }) .on('slid.bs.carousel', function () { - ok(false); + ok(false) }) .carousel('next') }) @@ -42,14 +42,14 @@ $(function () { ok($carousel.find('.item:eq(0)').is('.active')) ok($carousel.find('.carousel-indicators li:eq(0)').is('.active')) $carousel.carousel('next') - }, 1); + }, 1) }) $carousel.one('slid.bs.carousel', function () { setTimeout(function () { ok($carousel.find('.item:eq(1)').is('.active')) ok($carousel.find('.carousel-indicators li:eq(1)').is('.active')) start() - }, 1); + }, 1) }) $carousel.carousel('next') }) @@ -72,39 +72,39 @@ $(function () { stop() $(template) .on('slide.bs.carousel', function (e) { - e.preventDefault(); - ok(e.relatedTarget); - ok($(e.relatedTarget).hasClass('item')); - start(); + e.preventDefault() + ok(e.relatedTarget) + ok($(e.relatedTarget).hasClass('item')) + start() }) .carousel('next') }) test('should set interval from data attribute', 4, function () { - var template = $(' '); - template.attr('data-interval', 1814); + var template = $(' ') + template.attr('data-interval', 1814) - template.appendTo('body'); - $('[data-slide]').first().click(); - ok($('#myCarousel').data('bs.carousel').options.interval == 1814); - $('#myCarousel').remove(); + template.appendTo('body') + $('[data-slide]').first().click() + ok($('#myCarousel').data('bs.carousel').options.interval == 1814) + $('#myCarousel').remove() - template.appendTo('body').attr('data-modal', 'foobar'); - $('[data-slide]').first().click(); - ok($('#myCarousel').data('bs.carousel').options.interval == 1814, 'even if there is an data-modal attribute set'); - $('#myCarousel').remove(); + template.appendTo('body').attr('data-modal', 'foobar') + $('[data-slide]').first().click() + ok($('#myCarousel').data('bs.carousel').options.interval == 1814, 'even if there is an data-modal attribute set') + $('#myCarousel').remove() - template.appendTo('body'); - $('[data-slide]').first().click(); - $('#myCarousel').attr('data-interval', 1860); - $('[data-slide]').first().click(); - ok($('#myCarousel').data('bs.carousel').options.interval == 1814, 'attributes should be read only on intitialization'); - $('#myCarousel').remove(); + template.appendTo('body') + $('[data-slide]').first().click() + $('#myCarousel').attr('data-interval', 1860) + $('[data-slide]').first().click() + ok($('#myCarousel').data('bs.carousel').options.interval == 1814, 'attributes should be read only on intitialization') + $('#myCarousel').remove() - template.attr('data-interval', false); - template.appendTo('body'); - $('#myCarousel').carousel(1); - ok($('#myCarousel').data('bs.carousel').options.interval === false, 'data attribute has higher priority than default options'); - $('#myCarousel').remove(); + template.attr('data-interval', false) + template.appendTo('body') + $('#myCarousel').carousel(1) + ok($('#myCarousel').data('bs.carousel').options.interval === false, 'data attribute has higher priority than default options') + $('#myCarousel').remove() }) }) diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 133e6eab72d7..7948b3ab49c1 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -33,12 +33,12 @@ $(function () { stop() $('') .on('show.bs.collapse', function (e) { - e.preventDefault(); - ok(true); - start(); + e.preventDefault() + ok(true) + start() }) .on('shown.bs.collapse', function () { - ok(false); + ok(false) }) .collapse('show') }) diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 60e46364dc8f..08f6e3cfdf06 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -49,15 +49,15 @@ $(function () { test('should not fire closed when close is prevented', function () { $.support.transition = false - stop(); + stop() $('') .on('show.bs.tab', function (e) { - e.preventDefault(); - ok(true); - start(); + e.preventDefault() + ok(true) + start() }) .on('shown.bs.tab', function () { - ok(false); + ok(false) }) .tab('show') })