52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
import { shallowMount } from "@vue/test-utils";
|
|
import textLink from "./text-link";
|
|
import { nextTick } from "vue";
|
|
|
|
describe("text-link.vue", () => {
|
|
|
|
it("Should return class navigation-link", async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: "navigation",
|
|
},
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find("a");
|
|
|
|
// Expect
|
|
expect(paragraph.attributes("class")).toContain("navigation-link");
|
|
});
|
|
|
|
it("Should return class footer", async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: "footer",
|
|
},
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find("a");
|
|
|
|
// Expect
|
|
expect(paragraph.attributes("class")).toContain("footer");
|
|
});
|
|
|
|
it("Should return class text-small", async () => {
|
|
// Act
|
|
const wrapper = shallowMount(textLink, {
|
|
propsData: {
|
|
linkType: "textSmall",
|
|
},
|
|
});
|
|
|
|
// Assert
|
|
const paragraph = wrapper.find("a");
|
|
|
|
// Expect
|
|
expect(paragraph.attributes("class")).toContain("small");
|
|
});
|
|
|
|
});
|