aaac7fed
liuqimichale
add
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import BScroll from 'scroll/index'
describe('BScroll - init', () => {
it('init', () => {
const wrapper = document.createElement('div')
const scroller = document.createElement('div')
wrapper.appendChild(scroller)
const scroll = new BScroll(wrapper, {
tap: true,
click: true,
disableMouse: false
})
expect(scroll.options.scrollX)
.to.be.false
expect(scroll.options.scrollY)
.to.be.true
expect(scroll.options.tap)
.to.equal('tap')
expect(scroll.options.swipeBounceTime)
.to.equal(500)
expect(scroll.wrapperWidth)
.to.equal(0)
scroll.disable()
expect(scroll.enabled)
.to.be.false
scroll.enable()
expect(scroll.enabled)
.to.be.true
})
})
|