How to use the sortablejs.mockClear function in sortablejs

To help you get started, we’ve selected a few sortablejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SortableJS / Vue.Draggable / tests / unit / vuedraggable.spec.js View on Github external
function resetMocks() {
  Sortable.mockClear();
  SortableFake.destroy.mockClear();
  SortableFake.option.mockClear();
}
github SortableJS / Vue.Draggable / tests / unit / vuedraggable.spec.js View on Github external
beforeEach(() => {
    Sortable.mockClear();
    items = ["a", "b", "c"];
    const inside = items.map(item =&gt; `<div>${item}</div>`).join("");
    const template = `${inside}`
    wrapper = shallowMount(draggable, {
      attachToDocument: true,
      propsData: {
        value: items
      },
      slots: {
        default: template,
      }
    });
    vm = wrapper.vm;
    props = vm.$options.props;
    element = wrapper.element;
  });

sortablejs

JavaScript library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery required. Supports Meteor, AngularJS, React, Polymer, Vue, Knockout and any CSS library, e.g. Bootstrap.

MIT
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis