Skip to content

Commit

Permalink
test: add attachTo: document.body to make click event take effect
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Oct 14, 2022
1 parent 57f06c9 commit 28ab110
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-plugin-jsx/test/v-model.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ test('input[type="checkbox"] should work', async () => {
},
render() {
return <input type="checkbox" v-model={this.test} />;
},
});
}
}, { attachTo: document.body });

expect(wrapper.vm.$el.checked).toBe(true);
wrapper.vm.test = false;
Expand All @@ -36,7 +36,7 @@ test('input[type="radio"] should work', async () => {
</>
);
},
});
}, { attachTo: document.body });

const [a, b] = wrapper.vm.$.subTree.children as VNode[];

Expand Down

0 comments on commit 28ab110

Please sign in to comment.