feat(tests): add comprehensive unit tests for various components including AboutPage, CallPage, and MessagesPage
This commit is contained in:
20
tests/frontend/FormLabel.test.js
Normal file
20
tests/frontend/FormLabel.test.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { mount } from "@vue/test-utils";
|
||||
import { describe, it, expect } from "vitest";
|
||||
import FormLabel from "@/components/forms/FormLabel.vue";
|
||||
|
||||
describe("FormLabel.vue", () => {
|
||||
it("renders slot content", () => {
|
||||
const wrapper = mount(FormLabel, {
|
||||
slots: {
|
||||
default: "Label Text",
|
||||
},
|
||||
});
|
||||
expect(wrapper.text()).toBe("Label Text");
|
||||
});
|
||||
|
||||
it("has correct classes", () => {
|
||||
const wrapper = mount(FormLabel);
|
||||
expect(wrapper.classes()).toContain("block");
|
||||
expect(wrapper.classes()).toContain("text-sm");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user