xiatian 4 anni fa
parent
commit
5d95b4d06e
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      tests/unit/example.spec.js

+ 12 - 0
tests/unit/example.spec.js

@@ -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, {
+      propsData: { msg },
+    });
+    expect(wrapper.text()).toMatch(msg);
+  });
+});