$(function () { 'use strict'; module('carousel plugin') test('should be defined on jQuery object', function () { ok($(document.body).carousel, 'carousel method is defined') }) module('carousel', { setup: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapCarousel = $.fn.carousel.noConflict() }, teardown: function () { $.fn.carousel = $.fn.bootstrapCarousel delete $.fn.bootstrapCarousel } }) test('should provide no conflict', function () { strictEqual($.fn.carousel, undefined, 'carousel was set back to undefined (orig value)') }) 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 slid when slide is prevented', function () { stop() $('