File tree 4 files changed +41
-18
lines changed
4 files changed +41
-18
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " @sagalbot/vueable" ,
3
3
"version" : " 0.0.3" ,
4
4
"main" : " dist/@sagalbot/vueable.umd.js" ,
5
+ "license" : " MIT" ,
5
6
"scripts" : {
6
7
"serve" : " vue-cli-service serve ./dev/dev.js" ,
7
8
"build" : " vue-cli-service build --target lib ./src/index.js" ,
8
9
"lint" : " vue-cli-service lint" ,
9
- "test:unit" : " vue-cli-service test:unit"
10
+ "test" : " vue-cli-service test:unit" ,
11
+ "test:watch" : " vue-cli-service test:unit --watch"
10
12
},
11
13
"dependencies" : {},
12
14
"peerDependencies" : {
28
30
"sass-loader" : " ^7.0.1" ,
29
31
"vue" : " ^2.5.21" ,
30
32
"vue-cli-plugin-webpack-bundle-analyzer" : " ^1.2.0" ,
31
- "vue-template-compiler" : " ^2.5.17 "
33
+ "vue-template-compiler" : " ^2.5.21 "
32
34
},
33
35
"eslintConfig" : {
34
36
"root" : true ,
55
57
" not ie < 11"
56
58
],
57
59
"jest" : {
60
+ "collectCoverage" : true ,
61
+ "collectCoverageFrom" : [
62
+ " src/components/*.{js,jsx}" ,
63
+ " !**/node_modules/**"
64
+ ],
65
+ "coverageReporters" : [" text" ],
58
66
"moduleFileExtensions" : [
59
67
" js" ,
60
68
" jsx" ,
Original file line number Diff line number Diff line change
1
+ import { shallowMount , mount , createLocalVue } from '@vue/test-utils' ;
2
+ import Toggle from '../../src/components/Toggle.js' ;
3
+ import Target from '../../src/components/Target.js' ;
4
+
5
+ describe ( 'Toggle Component' , ( ) => {
6
+
7
+ it ( 'can customize the root $el tag rendered' , ( ) => {
8
+ const wrapper = shallowMount ( Toggle , {
9
+ propsData : {
10
+ tag : 'nav' ,
11
+ } ,
12
+ } ) ;
13
+
14
+ expect ( wrapper . html ( ) ) . toBe ( '<nav></nav>' ) ;
15
+ } ) ;
16
+
17
+ it ( 'can find the child Target component when mounted' , ( ) => {
18
+ const wrapper = shallowMount ( Toggle , {
19
+ slots : {
20
+ default : [ `<button>Trigger</button>` , Target ] ,
21
+ } ,
22
+ } ) ;
23
+
24
+ expect ( wrapper . vm . $data . target . $options . name ) . toEqual ( 'target' ) ;
25
+ } ) ;
26
+
27
+ } ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9352,10 +9352,10 @@ vue-style-loader@^4.1.0:
9352
9352
hash-sum "^1.0.2"
9353
9353
loader-utils "^1.0.2"
9354
9354
9355
- vue-template-compiler@^2.5.17 :
9356
- version "2.5.18 "
9357
- resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.18 .tgz#8a346e477c5ada6efc890a2db4857090a2c54a05 "
9358
- integrity sha512-WG2G+r5YxqkbTyJnbpkJuISTVI9MvYNGAZVKnmn8S4AoP0R0OufIKrHEV+GKwilLa+p3t/Plo8FzJXdhL9m4Sw ==
9355
+ vue-template-compiler@^2.5.21 :
9356
+ version "2.5.21 "
9357
+ resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.21 .tgz#a57ceb903177e8f643560a8d639a0f8db647054a "
9358
+ integrity sha512-Vmk5Cv7UcmI99B9nXJEkaK262IQNnHp5rJYo+EwYpe2epTAXqcVyExhV6pk8jTkxQK2vRc8v8KmZBAwdmUZvvw ==
9359
9359
dependencies :
9360
9360
de-indent "^1.0.2"
9361
9361
he "^1.1.0"
You can’t perform that action at this time.
0 commit comments