$(function () { 'use strict'; QUnit.module('modal plugin') QUnit.test('should be defined on jquery object', function (assert) { assert.expect(1) assert.ok($(document.body).modal, 'modal method is defined') }) QUnit.module('modal', { beforeEach: 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() }, afterEach: function () { $.fn.modal = $.fn.bootstrapModal delete $.fn.bootstrapModal } }) QUnit.test('should provide no conflict', function (assert) { assert.expect(1) assert.strictEqual($.fn.modal, undefined, 'modal was set back to undefined (orig value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { assert.expect(2) var $el = $('