mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 03:41:03 +00:00
rewrite carousel unit tests
This commit is contained in:
parent
747f0f4c7b
commit
62730d9afd
@ -34,7 +34,7 @@ const bsPlugins = {
|
||||
SelectorEngine: path.resolve(__dirname, '../js/src/dom/selector-engine.js'),
|
||||
Alert: path.resolve(__dirname, '../js/src/alert/alert.js'),
|
||||
Button: path.resolve(__dirname, '../js/src/button/button.js'),
|
||||
Carousel: path.resolve(__dirname, '../js/src/carousel.js'),
|
||||
Carousel: path.resolve(__dirname, '../js/src/carousel/carousel.js'),
|
||||
Collapse: path.resolve(__dirname, '../js/src/collapse.js'),
|
||||
Dropdown: path.resolve(__dirname, '../js/src/dropdown.js'),
|
||||
Modal: path.resolve(__dirname, '../js/src/modal.js'),
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
import Alert from './src/alert/alert'
|
||||
import Button from './src/button/button'
|
||||
import Carousel from './src/carousel'
|
||||
import Carousel from './src/carousel/carousel'
|
||||
import Collapse from './src/collapse'
|
||||
import Dropdown from './src/dropdown'
|
||||
import Modal from './src/modal'
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
import Alert from './src/alert/alert'
|
||||
import Button from './src/button/button'
|
||||
import Carousel from './src/carousel'
|
||||
import Carousel from './src/carousel/carousel'
|
||||
import Collapse from './src/collapse'
|
||||
import Dropdown from './src/dropdown'
|
||||
import Modal from './src/modal'
|
||||
|
@ -16,11 +16,11 @@ import {
|
||||
reflow,
|
||||
triggerTransitionEnd,
|
||||
typeCheckConfig
|
||||
} from './util/index'
|
||||
import Data from './dom/data'
|
||||
import EventHandler from './dom/event-handler'
|
||||
import Manipulator from './dom/manipulator'
|
||||
import SelectorEngine from './dom/selector-engine'
|
||||
} from '../util/index'
|
||||
import Data from '../dom/data'
|
||||
import EventHandler from '../dom/event-handler'
|
||||
import Manipulator from '../dom/manipulator'
|
||||
import SelectorEngine from '../dom/selector-engine'
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
@ -283,16 +283,12 @@ class Carousel {
|
||||
.on(this._element, Event.MOUSELEAVE, event => this.cycle(event))
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
if (this._config.touch && this._touchSupported) {
|
||||
this._addTouchEventListeners()
|
||||
}
|
||||
}
|
||||
|
||||
_addTouchEventListeners() {
|
||||
if (!this._touchSupported) {
|
||||
return
|
||||
}
|
||||
|
||||
const start = event => {
|
||||
if (this._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
|
||||
this.touchStartX = event.clientX
|
||||
@ -631,7 +627,7 @@ EventHandler.on(window, Event.LOAD_DATA_API, () => {
|
||||
* ------------------------------------------------------------------------
|
||||
* add .carousel to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
/* istanbul ignore if */
|
||||
if (typeof $ !== 'undefined') {
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
$.fn[NAME] = Carousel._jQueryInterface
|
1197
js/src/carousel/carousel.spec.js
Normal file
1197
js/src/carousel/carousel.spec.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -74,7 +74,9 @@ const rollupPreprocessor = {
|
||||
}
|
||||
}
|
||||
|
||||
let files = []
|
||||
let files = [
|
||||
'node_modules/hammer-simulator/index.js'
|
||||
]
|
||||
|
||||
const conf = {
|
||||
basePath: '../..',
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user