test: add MenuLabel component test case

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/3445/head
Ryan Wang 2022-04-13 11:40:02 +08:00
parent d3fefcb3a9
commit d9293f2199
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import { describe, expect, it } from "vitest";
import { VMenuLabel } from "../index";
import { mount } from "@vue/test-utils";
describe("MenuLabel", () => {
it("should render", () => {
expect(VMenuLabel).toBeDefined();
expect(
mount(VMenuLabel, { slots: { default: "Hello Halo" } }).html()
).toMatchSnapshot();
});
});

View File

@ -0,0 +1,8 @@
import { describe, expect, it } from "vitest";
import { VRoutesMenu } from "../RoutesMenu";
describe("RoutesMenu", () => {
it("should render", () => {
expect(VRoutesMenu).toBeDefined();
});
});

View File

@ -0,0 +1,3 @@
// Vitest Snapshot v1
exports[`MenuLabel > should render 1`] = `"<li class=\\"menu-label flex flex-col\\">Hello Halo</li>"`;