Skip to content

Commit 8fca958

Browse files
testing noneFunctionalComponentMode
1 parent fdaaac6 commit 8fca958

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/unit/vuedraggable.spec.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,26 @@ describe("draggable.vue when initialized with list", () => {
283283
})
284284
});
285285

286+
test.each([
287+
[Fake, true],
288+
[FakeFunctional, false]
289+
])(
290+
"when using component as tag",
291+
(component, expectedNoneFunctionalComponentMode) => {
292+
wrapper = mount(draggable, {
293+
propsData: {
294+
tag: "child",
295+
},
296+
stubs: {
297+
child: component
298+
}
299+
});
300+
const { vm: { noneFunctionalComponentMode } } = wrapper;
301+
expect(noneFunctionalComponentMode).toBe(expectedNoneFunctionalComponentMode);
302+
}
303+
)
304+
305+
286306
it("keeps a reference to Sortable instance", () => {
287307
expect(vm._sortable).toBe(SortableFake);
288308
})

0 commit comments

Comments
 (0)