$(function () { 'use strict' /* global QUnit */ /* global $ */ /* global AceApp */ QUnit.module('aside plugin') QUnit.test('should be defined on jquery object', function (assert) { assert.expect(1) assert.ok($(document.body).aceAside, 'aside method is defined') }) QUnit.module('aceAside', { beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.aceAsideNC = $.fn.aceAside.noConflict() }, afterEach: function () { $.fn.aceAside = $.fn.aceAsideNC delete $.fn.aceAsideNC $('#qunit-fixture').html('') } }) QUnit.test('should provide no conflict', function (assert) { assert.expect(1) assert.strictEqual(typeof $.fn.aceAside, 'undefined', 'aside was set back to undefined (org value)') }) QUnit.test('should return jquery collection containing the element', function (assert) { assert.expect(2) var $el = $('
') var $aside = $el.aceAsideNC() assert.ok($aside instanceof $, 'returns jquery collection') assert.strictEqual($aside[0], $el[0], 'collection contains element') }) QUnit.test('should set basic options', function (assert) { assert.expect(4) var aside = $('