$(function () { 'use strict'; module('modal plugin') test('should be defined on jquery object', function () { ok($(document.body).modal, 'modal method is defined') }) module('modal', { setup: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapModal = $.fn.modal.noConflict() }, teardown: function () { $.fn.modal = $.fn.bootstrapModal delete $.fn.bootstrapModal } }) test('should provide no conflict', function () { strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') }) test('should return jquery collection containing the element', function () { var $el = $('