Merge pull request #807 from ing-bank/chore/selectInReactTest

chore(select-rich): test React-like instantiation
This commit is contained in:
Thijs Louisse 2020-07-09 17:43:56 +02:00 committed by GitHub
commit ba8f0dd9a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -857,4 +857,24 @@ describe('lion-select-rich', () => {
expect(el.modelValue).to.equal(''); expect(el.modelValue).to.equal('');
}); });
}); });
describe('Instantiation methods', () => {
it('can be instantiated via "document.createElement"', async () => {
let properlyInstantiated = false;
try {
const el = document.createElement('lion-select-rich');
const optionsEl = document.createElement('lion-options');
optionsEl.slot = 'input';
const optionEl = document.createElement('lion-option');
optionsEl.appendChild(optionEl);
el.appendChild(optionsEl);
properlyInstantiated = true;
} catch (e) {
throw Error(e);
}
expect(properlyInstantiated).to.be.true;
});
});
}); });