mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 08:52:19 +02:00
Add tests
This commit is contained in:
parent
688ad3f534
commit
483e6da550
|
@ -64,7 +64,7 @@ describe('choices', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('passing the searchEnabled config option as false', () => {
|
describe('passing the searchEnabled config option with a value of false', () => {
|
||||||
describe('passing a select-multiple element', () => {
|
describe('passing a select-multiple element', () => {
|
||||||
it('sets searchEnabled to true', () => {
|
it('sets searchEnabled to true', () => {
|
||||||
document.body.innerHTML = `
|
document.body.innerHTML = `
|
||||||
|
@ -79,6 +79,20 @@ describe('choices', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('passing the renderSelectedChoices config option with an unexpected value', () => {
|
||||||
|
it('sets renderSelectedChoices to "auto"', () => {
|
||||||
|
document.body.innerHTML = `
|
||||||
|
<select data-choice multiple></select>
|
||||||
|
`;
|
||||||
|
|
||||||
|
instance = new Choices('[data-choice]', {
|
||||||
|
renderSelectedChoices: 'test',
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(instance.config.renderSelectedChoices).to.equal('auto');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue