Skip to content

Commit

Permalink
chore(ImageCrop): fixed test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchao committed May 14, 2024
1 parent b7dbada commit 5bedc82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vant/src/image-crop/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ test('cancel crop', async () => {
it('calls `addEventDefault`', async () => {
const wrapper = mount(ImageCrop);

let spy = vi.spyOn(wrapper.vm, 'addEventDefault');
let spy = vi.spyOn(wrapper.vm, 'addEventHandler');
await wrapper.setData({ visible: true });
expect(spy).toBeCalled();

spy = vi.spyOn(wrapper.vm, 'removeEventDefault');
spy = vi.spyOn(wrapper.vm, 'removeEventHandler');
await wrapper.setData({ visible: false });
expect(spy).toBeCalled();

Expand Down

0 comments on commit 5bedc82

Please sign in to comment.