File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" hello" >
3
+ <click-me-button ></click-me-button >
3
4
<div class =" counter" >{{ counter }}</div >
4
5
<h1 >{{ msg }}</h1 >
5
6
<h2 >Essential Links</h2 >
22
23
</template >
23
24
24
25
<script >
26
+ import ClickMeButton from ' ../components/ClickMeButton'
25
27
export default {
26
- name: ' hello' ,
27
- data () {
28
- return {
29
- msg: ' Welcome to Your Vue.js App' ,
30
- counter: 0
28
+ name: ' hello' ,
29
+ components: {
30
+ ClickMeButton
31
+ },
32
+ data () {
33
+ return {
34
+ msg: ' Welcome to Your Vue.js App' ,
35
+ counter: 0
36
+ }
31
37
}
32
- }
33
38
}
34
39
</script >
35
40
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
+ import ClickMeButton from '@/components/ClickMeButton'
2
3
import Hello from '@/components/Hello'
3
4
4
5
describe ( 'Hello.vue' , ( ) => {
@@ -54,4 +55,9 @@ describe('Hello.vue', () => {
54
55
it ( 'should check the name of my vue' , ( ) => {
55
56
expect ( vm . $options . name ) . to . equal ( 'hello' )
56
57
} )
58
+
59
+ it ( 'should include a clickMeButton' , ( ) => {
60
+ const clickMeButton = vm . $options . components . ClickMeButton
61
+ expect ( clickMeButton ) . to . contain ( ClickMeButton )
62
+ } )
57
63
} )
You can’t perform that action at this time.
0 commit comments