Skip to content

Commit 140b771

Browse files
committed
Remove unnecessary assignments
1 parent 6011af0 commit 140b771

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/vue-testing-library.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,8 @@ fireEvent.update = async (elem, value) => {
121121
}
122122

123123
case 'INPUT': {
124-
if (type === 'checkbox') {
125-
elem.checked = value
126-
return fireEvent.change(elem)
127-
} else if (type === 'radio') {
128-
elem.selected = value
124+
if (['checkbox', 'radio'].includes(type)) {
125+
elem.checked = true
129126
return fireEvent.change(elem)
130127
} else {
131128
elem.value = value

0 commit comments

Comments
 (0)