Closed
Description
I'm not sure if this is vuelidate related or not but fireEvent.update doesn't seem to work on a standard input field. I can fix it by updating vue-testing-library.js to change the fireEvent.input to fireEvent.change
Such as on line 247.
case 'INPUT':
{
if (['checkbox', 'radio'].includes(type)) {
elem.checked = true;
return fireEvent.change(elem);
} else {
elem.value = value;
return fireEvent.input(elem);
}
}
to
case 'INPUT':
{
if (['checkbox', 'radio'].includes(type)) {
elem.checked = true;
return fireEvent.change(elem);
} else {
elem.value = value;
return fireEvent.change(elem);
}
}
The above change fixes the issue. Any chance we can use change instead of input. Perhaps there's a bug with the input function.
Metadata
Metadata
Assignees
Labels
No labels