2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Comply to the new rules.

This commit is contained in:
XhmikosR
2019-02-26 13:20:34 +02:00
parent 44e6abcba5
commit 46c037410b
44 changed files with 854 additions and 771 deletions
+11 -7
View File
@@ -1,7 +1,7 @@
$(function () {
'use strict'
window.Carousel = typeof bootstrap !== 'undefined' ? bootstrap.Carousel : Carousel
window.Carousel = typeof bootstrap === 'undefined' ? Carousel : bootstrap.Carousel
var originWinPointerEvent = window.PointerEvent
window.MSPointerEvent = null
@@ -65,8 +65,8 @@ $(function () {
$el.bootstrapCarousel()
try {
$el.bootstrapCarousel('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -89,8 +89,8 @@ $(function () {
try {
$('<div/>').bootstrapCarousel(config)
} catch (err) {
message = err.message
} catch (error) {
message = error.message
}
assert.ok(message === expectedMessage, 'correct error message')
@@ -102,8 +102,8 @@ $(function () {
try {
$('<div/>').bootstrapCarousel(config)
} catch (err) {
message = err.message
} catch (error) {
message = error.message
}
assert.ok(message === expectedMessage, 'correct error message')
@@ -161,6 +161,7 @@ $(function () {
}, 0)
$carousel[0].removeEventListener('slide.bs.carousel', onSlide)
}
$carousel[0].addEventListener('slide.bs.carousel', onSlide)
function onSlid() {
@@ -173,6 +174,7 @@ $(function () {
}, 0)
$carousel[0].removeEventListener('slid.bs.carousel', onSlid)
}
$carousel[0].addEventListener('slid.bs.carousel', onSlid)
$carousel.bootstrapCarousel('next')
@@ -682,6 +684,7 @@ $(function () {
assert.strictEqual(event.defaultPrevented, false)
$template[0].removeEventListener('keydown', handlerKeydown)
}
$template[0].addEventListener('keydown', handlerKeydown)
// arrow down
@@ -694,6 +697,7 @@ $(function () {
$template[0].addEventListener('keydown', handlerKeydown2)
done()
}
$template[0].addEventListener('keydown', handlerKeydown2)
// arrow up