diff options
Diffstat (limited to 'tests/unit/example.spec.js')
-rw-r--r-- | tests/unit/example.spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/example.spec.js b/tests/unit/example.spec.js new file mode 100644 index 00000000..a846fbdb --- /dev/null +++ b/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); + }); +}); |