diff options
author | XhmikosR <xhmikosr@gmail.com> | 2015-04-29 12:11:58 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2015-05-05 06:50:18 +0300 |
commit | 49c45563546af97eaab0c6f083d68fbc3b4a0ce6 (patch) | |
tree | 282625ff1f31bf0441821254a61d2313786ae20b /js | |
parent | 93785be2c689a38f134e201feb753faf782fffa2 (diff) |
Comply to the new JSCS rules.
Diffstat (limited to 'js')
-rw-r--r-- | js/tab.js | 2 | ||||
-rw-r--r-- | js/tests/unit/modal.js | 18 |
2 files changed, 11 insertions, 9 deletions
@@ -14,7 +14,9 @@ // ==================== var Tab = function (element) { + // jscs:disable requireDollarBeforejQueryAssignment this.element = $(element) + // jscs:enable requireDollarBeforejQueryAssignment } Tab.VERSION = '3.3.4' diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 3c51c2fe2e..217e4d7f76 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -166,16 +166,16 @@ $(function () { assert.expect(3) var done = assert.async() - var div = $('<div id="modal-test"/>') - div + var $div = $('<div id="modal-test"/>') + $div .on('shown.bs.modal', function () { assert.ok($('#modal-test').length, 'modal insterted into dom') assert.ok($('#modal-test').is(':visible'), 'modal visible') - div.trigger($.Event('keydown', { which: 27 })) + $div.trigger($.Event('keydown', { which: 27 })) setTimeout(function () { assert.ok(!$('#modal-test').is(':visible'), 'modal hidden') - div.remove() + $div.remove() done() }, 0) }) @@ -186,16 +186,16 @@ $(function () { assert.expect(3) var done = assert.async() - var div = $('<div id="modal-test"/>') - div + var $div = $('<div id="modal-test"/>') + $div .on('shown.bs.modal', function () { assert.ok($('#modal-test').length, 'modal inserted into dom') assert.ok($('#modal-test').is(':visible'), 'modal visible') - div.trigger($.Event('keyup', { which: 27 })) + $div.trigger($.Event('keyup', { which: 27 })) setTimeout(function () { - assert.ok($('#modal-test').is(':visible'), 'modal still visible') - div.remove() + assert.ok($div.is(':visible'), 'modal still visible') + $div.remove() done() }, 0) }) |