mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 09:55:57 +03:00
update tests to use lazyelement
This commit is contained in:
parent
861998af75
commit
5044d78378
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue