diff options
| author | XhmikosR <[email protected]> | 2014-06-07 09:13:05 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2014-06-07 09:13:05 +0300 |
| commit | 3b99a41246cb25b1fba79d14007ed0238409e63f (patch) | |
| tree | cdd3f6ba9afca51d0c8085b176984496bf1176b7 /js/tests/unit/button.js | |
| parent | 3cbbc70d55aeff62f5b53929b60439f7cc960e19 (diff) | |
| parent | 03a8949d7c7937dd56da0802acbbded1ee27152f (diff) | |
| download | bootstrap-3b99a41246cb25b1fba79d14007ed0238409e63f.tar.xz bootstrap-3b99a41246cb25b1fba79d14007ed0238409e63f.zip | |
Merge pull request #13388 from twbs/xhmikosr-js-style
Improve JS style
Diffstat (limited to 'js/tests/unit/button.js')
| -rw-r--r-- | js/tests/unit/button.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index da65ae383..671a93891 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -1,4 +1,5 @@ $(function () { + 'use strict'; module('button plugin') @@ -7,11 +8,11 @@ $(function () { }) module('button', { - setup: function() { + setup: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapButton = $.fn.button.noConflict() }, - teardown: function() { + teardown: function () { $.fn.button = $.fn.bootstrapButton delete $.fn.bootstrapButton } @@ -88,8 +89,8 @@ $(function () { }) test('should toggle active when btn children are clicked', function () { - var btn = $('<button class="btn" data-toggle="button">mdo</button>'), - inner = $('<i></i>') + var btn = $('<button class="btn" data-toggle="button">mdo</button>') + var inner = $('<i></i>') btn .append(inner) .appendTo($('#qunit-fixture')) @@ -99,9 +100,9 @@ $(function () { }) test('should toggle active when btn children are clicked within btn-group', function () { - var btngroup = $('<div class="btn-group" data-toggle="buttons"></div>'), - btn = $('<button class="btn">fat</button>'), - inner = $('<i></i>') + var btngroup = $('<div class="btn-group" data-toggle="buttons"></div>') + var btn = $('<button class="btn">fat</button>') + var inner = $('<i></i>') btngroup .append(btn.append(inner)) .appendTo($('#qunit-fixture')) |
