mirror of
https://github.com/Choices-js/Choices.git
synced 2024-04-30 13:02:48 +02:00
Add test with searchFloor of 0
This commit is contained in:
parent
23f0b7cb9d
commit
25a7ed0318
|
@ -1763,6 +1763,21 @@ describe('choices', () => {
|
||||||
|
|
||||||
instance._onKeyUp({ target: null, keyCode: null });
|
instance._onKeyUp({ target: null, keyCode: null });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('is fired with a searchFloor of 0', (done) => {
|
||||||
|
instance.config.searchFloor = 0;
|
||||||
|
instance.input.value = '';
|
||||||
|
instance.input.focus();
|
||||||
|
instance.passedElement.element.addEventListener('search', (event) => {
|
||||||
|
expect(event.detail).to.eql({
|
||||||
|
value: instance.input.value,
|
||||||
|
resultCount: 0,
|
||||||
|
});
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
|
||||||
|
instance._onKeyUp({ target: null, keyCode: null });
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue