151a7e54ae
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
21 lines
445 B
TypeScript
21 lines
445 B
TypeScript
import { mount } from "@vue/test-utils";
|
|
import Tag from "@/components/TagElement.vue";
|
|
import { it, expect } from "vitest";
|
|
|
|
const tagContent = "My tag";
|
|
|
|
const createComponent = () => {
|
|
return mount(Tag, {
|
|
slots: {
|
|
default: tagContent,
|
|
},
|
|
});
|
|
};
|
|
|
|
it("renders a Vue component", () => {
|
|
const wrapper = createComponent();
|
|
|
|
expect(wrapper.exists()).toBe(true);
|
|
expect(wrapper.find("span").text()).toEqual(tagContent);
|
|
});
|