Skip to content

Commit

Permalink
Merge pull request #308 from aquariuslt/master
Browse files Browse the repository at this point in the history
test: fix ut fail since `CityPicker` trigger onChange twice
  • Loading branch information
z2014 committed Aug 4, 2019
2 parents 33ae750 + 85baa34 commit c503186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/citypicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ describe('<CityPicker></CityPicker>', ()=>{
$pickergroup.simulate('touchEnd')

const $btn = wrapper.find('.weui-picker__action').last()

$btn.simulate('click')

setTimeout(()=>assert(cb.calledOnce == true), 500)
// after use react 16 adapter will trigger twice cb?
setTimeout(()=>assert(cb.called == true), 500)
})

it('should change pickergroup item when scroll on parent group', ()=>{
Expand Down Expand Up @@ -134,4 +134,4 @@ describe('<CityPicker></CityPicker>', ()=>{
//assert after change
assert($child.find('.weui-picker__item').text() == 'city1-2-1')
})
})
})

0 comments on commit c503186

Please sign in to comment.