diff --git a/tests/unit/example.spec.ts b/tests/unit/example.spec.ts new file mode 100644 index 0000000..0811d8a --- /dev/null +++ b/tests/unit/example.spec.ts @@ -0,0 +1,12 @@ +import { shallowMount } from "@vue/test-utils"; +import HelloWorld from "@/components/HelloWorld.vue"; + +describe("HelloWorld.vue", () => { + it("renders props.msg when passed", () => { + const msg = "new message"; + const wrapper = shallowMount(HelloWorld, { + props: { msg }, + }); + expect(wrapper.text()).toMatch(msg); + }); +});