v-tree-vue
Version:
A light-weight library for management of hierachical content. Most solutions I found did not offer the depth of flexibility I needed with the tree. I decided to solve my problem and also give back to the Vue community. Feel free to log issues, I will jump
16 lines (12 loc) • 591 B
text/typescript
import { TreeViewCreatedEventPayload } from "@/businessLogic/contracts/types";
import { mount } from "@vue/test-utils";
import TreeView from "./treeView.vue";
describe("treeview.vue", () => {
it("onCreated should emit events customisation payload", () => {
const treeView = mount(TreeView);
const emittedEvent = treeView.emitted().created;
if (!emittedEvent) fail("Did not emit created event");
const payload = emittedEvent[0][0] as TreeViewCreatedEventPayload;
expect(payload.itemCustomisations).not.toBe(undefined);
})
});