Skip to content

Commit 562bf11

Browse files
committed
fix: ensure Wrapper.setChecked() idempotence
1 parent 1ee1fa0 commit 562bf11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/test-utils/src/wrapper.js

+4
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,10 @@ export default class Wrapper implements BaseWrapper {
375375
)
376376
}
377377

378+
if (this.element.checked === checked) {
379+
return
380+
}
381+
378382
if (event !== 'click' || isPhantomJS) {
379383
// $FlowIgnore
380384
this.element.selected = true

0 commit comments

Comments
 (0)