Skip to content

Commit ba6e83e

Browse files
committed
fix tests for better-scroll changes
1 parent f6f227f commit ba6e83e

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

test/unit/specs/index-list.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ describe('IndexList', () => {
8686
on: {}
8787
})
8888
vm.$parent.$forceUpdate()
89-
vm.refresh()
9089
}, 30)
9190
setTimeout(() => {
9291
const zEle = vm.$el.querySelector('.cube-index-list-nav li[data-index="2"]')

test/unit/specs/picker.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ describe('Picker', () => {
110110
on: events
111111
})
112112
vm.$parent.$forceUpdate()
113-
vm.refresh()
114113
}, 30)
115114
setTimeout(() => {
116115
vm.show()

test/unit/specs/scroll.spec.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ const props = {
99
'我是第 3 行',
1010
'我是第 4 行'
1111
],
12-
pullDownRefresh: {
13-
threshold: 10,
14-
stop: 40,
15-
txt: '刷新成功'
16-
},
17-
pullUpLoad: {
18-
threshold: 0,
19-
txt: {
20-
more: '加载更多订单',
21-
noMore: '没有更多订单了'
12+
options: {
13+
pullDownRefresh: {
14+
threshold: 10,
15+
stop: 40,
16+
txt: '刷新成功'
17+
},
18+
pullUpLoad: {
19+
threshold: 0,
20+
txt: {
21+
more: '加载更多订单',
22+
noMore: '没有更多订单了'
23+
}
2224
}
2325
},
2426
listenScroll: true,
@@ -151,7 +153,10 @@ describe('Scroll', () => {
151153
const clickHandler = sinon.spy()
152154
vm = createScroll({
153155
...props,
154-
click: false
156+
options: {
157+
...props.options,
158+
click: false
159+
}
155160
}, {
156161
click: clickHandler
157162
})

0 commit comments

Comments
 (0)