How to use the sortablejs.mock 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
it("creates sortable instance with options", () => {
    expect(Sortable.mock.calls.length).toBe(1);
    const parameters = Sortable.mock.calls[0];
    expect(parameters[0]).toBe(element);
    expect(parameters[1]).toMatchObject({
      draggable: ">*",
      sortableOption: "value",
      toBeCamelized: true
    });
  })
github SortableJS / Vue.Draggable / tests / unit / vuedraggable.spec.js View on Github external
it("creates sortable instance with options on transition root", () => {
    expect(Sortable.mock.calls.length).toBe(1);
    const parameters = Sortable.mock.calls[0];
    expect(parameters[0]).toBe(element.children[0]);
  })
github SortableJS / Vue.Draggable / tests / unit / vuedraggable.integrated.spec.js View on Github external
function getEvent(name) {
  return Sortable.mock.calls[0][1][name];
}

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 4 months ago

Package Health Score

94 / 100
Full package analysis