update tests to use lazyelement

This commit is contained in:
realaravinth 2021-07-21 20:48:31 +05:30
parent 861998af75
commit 5044d78378
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -19,13 +19,13 @@ import form from './index';
it('sudo form works', () => {
try {
form();
form.get();
} catch (e) {
expect(e.message).toBe("Couldn't form element, is the component loaded?");
expect(e.message).toBe("Element form is undefined");
}
const element = document.createElement('form');
element.id = 'form';
document.body.appendChild(element);
expect(form()).toBe(element);
expect(form.get()).toBe(element);
});