Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
test('should have clear button & clear value', () => {
const wrapper = mount(<select>)
expect(wrapper.find(`.${SO_PREFIX}-select-close`).length).toBe(1)
// clear value
wrapper.find(`.${SO_PREFIX}-select-close`).simulate('click')
expect(wrapper.find('Select').prop('value')).toBeUndefined()
})
test('should have clear button & clear value on multiple select', () => {</select>
test('should set format key and renderItem on single select', () => {
const format = 'id'
const renderItem = 'city'
const changeFn = jest.fn()
const wrapper = mount(
<select> v === d.id}
renderItem={renderItem}
/>
)
appendToDOM(wrapper.html())
vSingle({ changeFn, format, citys, wrapper, renderItem })
})
</select>
};
this.nextHandler = sinon.spy();
const handlers = {
'NEXT': () => {
this.secondElement.focus();
this.nextHandler();
}
};
this.reactDiv = document.createElement('div');
document.body.appendChild(this.reactDiv);
this.wrapper = mount(
<div>
<div>
<div>
</div>,
{ attachTo: this.reactDiv }
);
this.firstElement = new FocusableElement(this.wrapper, '.firstChildElement');
this.secondElement = new FocusableElement(this.wrapper, '.secondChildElement');
this.firstElement.focus();</div></div>
return (
<select value="{this.state.value}" multiple=""> v === d.id}
renderItem={renderItem}
/>
)
}
}
const wrapper = mount()
appendToDOM(wrapper.html())
vMultiple({ wrapper, format: datum.format, changeFn, citys })
})
})</select>