上传文件至 tests/unit
This commit is contained in:
12
tests/unit/example.spec.ts
Normal file
12
tests/unit/example.spec.ts
Normal file
@ -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);
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user