UNPKG

@oruga-ui/oruga-next

Version:

UI components for Vue.js and CSS framework agnostic

18 lines (14 loc) 624 B
import { describe, test, expect, afterEach } from "vitest"; import { enableAutoUnmount, mount } from "@vue/test-utils"; import ONotification from "@/components/notification/Notification.vue"; describe("ONotification tests", () => { enableAutoUnmount(afterEach); test("render correctly", () => { const wrapper = mount(ONotification); expect(!!wrapper.vm).toBeTruthy(); expect(wrapper.exists()).toBeTruthy(); expect(wrapper.html()).toMatchSnapshot(); const element = wrapper.find("article"); expect(element.attributes("data-oruga")).toBe("notification"); }); });