diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 474cfb40c7..1f2fce30b3 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -19,156 +19,358 @@ $(function () { }) test('should provide no conflict', function () { - ok(!$.fn.carousel, 'carousel was set back to undefined (orig value)') + strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') }) - test('should return element', function () { - ok($(document.body).bootstrapCarousel()[0] == document.body, 'document.body returned') + test('should return jquery collection containing the element', function () { + var $el = $('
') + var $carousel = $el.bootstrapCarousel() + ok($carousel instanceof $, 'returns jquery collection') + strictEqual($carousel[0], $el[0], 'collection contains element') }) - test('should not fire slide when slide is prevented', function () { - $.support.transition = false + test('should not fire slid when slide is prevented', function () { stop() $('