Skip to content

Commit

Permalink
テストの内容をコンポーネントに合わせて変更
Browse files Browse the repository at this point in the history
  • Loading branch information
takusea committed Feb 28, 2024
1 parent 5227d3d commit b39ebd2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 38 deletions.
32 changes: 32 additions & 0 deletions tests/unit/components/help/HelpMarkdownViewSection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { mount, flushPromises } from "@vue/test-utils";
import { describe, it } from "vitest";
import HelpMarkdownViewSection from "@/components/template/HelpMarkdownViewSection.vue";
import { markdownItPlugin } from "@/plugins/markdownItPlugin";

describe("HelpMarkdownViewSection.vue", () => {
it("can mount", () => {
mount(HelpMarkdownViewSection, {
global: {
plugins: [markdownItPlugin],
},
props: {
markdown: "",
},
});
});

it("has markdown text", async () => {
const wrapper = mount(HelpMarkdownViewSection, {
global: {
plugins: [markdownItPlugin],
},
props: {
markdown: "# title",
},
});

await flushPromises();

expect(wrapper.find("h1").text()).to.equal("title");
});
});
38 changes: 0 additions & 38 deletions tests/unit/components/help/HowToUse.spec.ts

This file was deleted.

0 comments on commit b39ebd2

Please sign in to comment.