Add test with searchFloor of 0

This commit is contained in:
Matt Triff 2021-12-31 21:51:00 -05:00
parent 23f0b7cb9d
commit 25a7ed0318

View file

@ -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 });
});
}); });
}); });