Skip to content

Commit e810c46

Browse files
Adding tests
1 parent dee528d commit e810c46

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unit/vuedraggable.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ describe("draggable.vue when initialized with list", () => {
215215
}
216216
);
217217

218+
it("creates sortable instance with options", () => {
219+
expect(Sortable.mock.calls.length).toBe(1);
220+
const parameters = Sortable.mock.calls[0];
221+
expect(parameters[0]).toBe(element);
222+
expect(parameters[1]).toMatchObject({
223+
draggable: ">*",
224+
sortableOption: "value",
225+
toBeCamelized: true
226+
});
227+
})
228+
218229
describe("when add is called", () => {
219230
let newItem;
220231
beforeEach(async() => {

0 commit comments

Comments
 (0)