From 4a2d337bf5f329eac1ca16208414ec1ebfe0546e Mon Sep 17 00:00:00 2001 From: fat Date: Mon, 24 Mar 2014 19:15:58 -0700 Subject: fixes #9461 - Make carousel ignore non-items in carousel-inner --- js/tests/unit/carousel.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'js/tests') diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 6f69855c7..562e30255 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -107,4 +107,32 @@ $(function () { ok($('#myCarousel').data('bs.carousel').options.interval === false, 'data attribute has higher priority than default options') $('#myCarousel').remove() }) + + test('should skip over non-items', function () { + $.support.transition = false + + var $template = $( + '' + ) + + $template.carousel() + + equal($template.find('.item')[0], $template.find('.active')[0], 'the first carousel item should be active') + + $template.carousel(1) + + equal($template.find('.item')[1], $template.find('.active')[0], 'the second carousel item should be active') + }) }) -- cgit v1.2.3