Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import vue2Dropzone from 'vue2-dropzone';
- import { mount } from '@vue/test-utils';
- describe('DropZone test suite', () => {
- it('dropzone emits drag events', () => {
- const wrapper = mount(vue2Dropzone, {
- propsData: {
- id: 'dropzone',
- options: {
- url: '/',
- maxFiles: 1,
- addRemoveLinks: true,
- autoProcessQueue: false,
- },
- },
- });
- wrapper.trigger('dragenter', {
- file: 1,
- });
- expect(wrapper.emitted('vdropzone-drag-enter')[0]).toEqual(
- expect.arrayContaining([expect.objectContaining({ file: 1 })]),
- );
- });
- });
Add Comment
Please, Sign In to add comment