0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge pull request #15933 from twbs/qunit-module-hooks

Unit tests: Use new names of module hooks
This commit is contained in:
Heinrich Fenkart 2015-02-26 08:36:17 +01:00
commit c65deddcce
13 changed files with 26 additions and 26 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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)

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}