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 440c934 commit b46c0ccCopy full SHA for b46c0cc
template/test/client/components/HelloWorld.spec.js
@@ -1,15 +1,12 @@
1
-import Vue from 'vue';
+import { mount } from 'vue-test-utils';
2
import HelloWorld from '@/components/HelloWorld/HelloWorld.vue';
3
4
describe('HelloWorld.vue', () => {
5
- const Constructor = Vue.extend(HelloWorld);
+ const wrapper = mount(HelloWorld);
6
7
it('should render correct content', () => {
8
- const vm = new Constructor().$mount();
9
- return Vue.nextTick().then(() => {
10
- expect(vm.$el.innerHTML).toContain(
11
- 'Hello World! This content is restricted.'
12
- );
13
- });
+ expect(wrapper.html()).toContain(
+ 'Hello World! This content is restricted.'
+ );
14
});
15
0 commit comments