diff --git a/js/tests/index.html b/js/tests/index.html
index b32f0adc2..05e9009fc 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 d0d3ccc52..d2c74f464 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 dc9235c77..75ae2d2ef 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 d173916a0..5a547a370 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 2044b1408..4cae5e46e 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 1616fe48b..c1a41a45f 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 67b261744..0a425200a 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 3918bd1e4..d0973a30d 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 ea7455cfc..f6f0ac00f 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 571ceddd4..55ab94971 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 5dfc99866..41d82e0e5 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 215178cc8..d497de454 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 e5d1ad966..e5409189b 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
}