diff --git a/js/tests/index.html b/js/tests/index.html index b32f0adc22..05e9009fcb 100644 --- a/js/tests/index.html +++ b/js/tests/index.html @@ -43,12 +43,12 @@ QUnit.testStart(function (testDetails) { $(window).scrollTop(0) - QUnit.log = function (details) { + QUnit.log(function (details) { if (!details.result) { details.name = testDetails.name log.push(details) } - } + }) }) // Cleanup diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js index d0d3ccc523..d2c74f4640 100644 --- a/js/tests/unit/affix.js +++ b/js/tests/unit/affix.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('affix', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapAffix = $.fn.affix.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.affix = $.fn.bootstrapAffix delete $.fn.bootstrapAffix } diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index dc9235c774..75ae2d2ef8 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('alert', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapAlert = $.fn.alert.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.alert = $.fn.bootstrapAlert delete $.fn.bootstrapAlert } diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index d173916a0c..5a547a370d 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('button', { - setup: function () { + beforeEach: 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 () { + afterEach: function () { $.fn.button = $.fn.bootstrapButton delete $.fn.bootstrapButton } diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index 2044b14089..4cae5e46e8 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('carousel', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapCarousel = $.fn.carousel.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.carousel = $.fn.bootstrapCarousel delete $.fn.bootstrapCarousel } diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 1616fe48b0..c1a41a45f5 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('collapse', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapCollapse = $.fn.collapse.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.collapse = $.fn.bootstrapCollapse delete $.fn.bootstrapCollapse } diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index 67b2617446..0a425200a6 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('dropdowns', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapDropdown = $.fn.dropdown.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.dropdown = $.fn.bootstrapDropdown delete $.fn.bootstrapDropdown } diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 3918bd1e4b..d0973a30d5 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('modal', { - setup: function () { + 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() }, - teardown: function () { + afterEach: function () { $.fn.modal = $.fn.bootstrapModal delete $.fn.bootstrapModal } diff --git a/js/tests/unit/phantom.js b/js/tests/unit/phantom.js index ea7455cfc3..f6f0ac00fd 100644 --- a/js/tests/unit/phantom.js +++ b/js/tests/unit/phantom.js @@ -31,8 +31,8 @@ if (!obj.result) { // Dumping large objects can be very slow, and the dump isn't used for // passing tests, so only dump if the test failed. - actual = QUnit.jsDump.parse(obj.actual) - expected = QUnit.jsDump.parse(obj.expected) + actual = QUnit.dump.parse(obj.actual) + expected = QUnit.dump.parse(obj.expected) } // Send it. sendMessage('qunit.log', obj.result, actual, expected, obj.message, obj.source) diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index 571ceddd43..55ab94971a 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('popover', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapPopover = $.fn.popover.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.popover = $.fn.bootstrapPopover delete $.fn.bootstrapPopover } diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index 5dfc998663..41d82e0e53 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('scrollspy', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapScrollspy = $.fn.scrollspy.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.scrollspy = $.fn.bootstrapScrollspy delete $.fn.bootstrapScrollspy } diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 215178cc89..d497de454a 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('tabs', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapTab = $.fn.tab.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.tab = $.fn.bootstrapTab delete $.fn.bootstrapTab } diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index e5d1ad9660..e5409189b5 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -8,11 +8,11 @@ $(function () { }) QUnit.module('tooltip', { - setup: function () { + beforeEach: function () { // Run all tests in noConflict mode -- it's the only way to ensure that the plugin works in noConflict mode $.fn.bootstrapTooltip = $.fn.tooltip.noConflict() }, - teardown: function () { + afterEach: function () { $.fn.tooltip = $.fn.bootstrapTooltip delete $.fn.bootstrapTooltip }