We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d36bbd7 commit 96864ffCopy full SHA for 96864ff
tests/unit/example.spec.js
@@ -1,12 +1,12 @@
1
-import { shallowMount } from '@vue/test-utils'
2
-import HelloWorld from '@/components/HelloWorld.vue'
+import { mount } from "@vue/test-utils";
3
4
-describe('HelloWorld.vue', () => {
5
- it('renders props.msg when passed', () => {
6
- const msg = 'new message'
7
- const wrapper = shallowMount(HelloWorld, {
8
- props: { msg }
9
- })
10
- expect(wrapper.text()).toMatch(msg)
11
12
-})
+const App = {
+ template: `
+ <div>Hello</div>
+ `,
+};
+
+test("App", () => {
+ const wrapper = mount(App);
+ expect(wrapper.html()).toBe("<div>Hello</div>");
+});
0 commit comments