Skip to content

Commit 90a7ea8

Browse files
committed
fix: ensure Wrapper.setSelected() idempotency
1 parent e229e37 commit 90a7ea8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: packages/test-utils/src/wrapper.js

+4
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ export default class Wrapper implements BaseWrapper {
404404
}
405405

406406
if (tagName === 'OPTION') {
407+
if (this.element.selected) {
408+
return
409+
}
410+
407411
// $FlowIgnore
408412
this.element.selected = true
409413
// $FlowIgnore

0 commit comments

Comments
 (0)