@@ -29,6 +29,10 @@ describe('tests grid', () => {
29
29
expect ( typeof docGrid [ 'description' ] !== 'undefined' ) . to . be . true
30
30
} )
31
31
32
+ it ( 'should the component have msg prop default equal this is a secret' , ( ) => {
33
+ expect ( docGrid [ 'props' ] [ 'msg' ] [ 'defaultValue' ] [ 'value' ] ) . to . equal ( '"this is a secret"' )
34
+ } )
35
+
32
36
it ( 'should have methods' , ( ) => {
33
37
expect ( typeof docGrid [ 'methods' ] !== 'undefined' ) . to . be . true
34
38
} )
@@ -56,7 +60,7 @@ describe('tests grid', () => {
56
60
57
61
describe ( 'tests button' , ( ) => {
58
62
docButton = api . parse ( button ) ;
59
- console . log ( JSON . stringify ( docGrid , null , 2 ) ) ;
63
+ console . log ( JSON . stringify ( docButton , null , 2 ) ) ;
60
64
61
65
it ( 'should return an object' , ( ) => {
62
66
expect ( docButton ) . to . be . an ( 'object' )
@@ -70,8 +74,20 @@ describe('tests button', () => {
70
74
expect ( docButton . description ) . to . equal ( 'This is an example of creating a reusable grid component and using it with external data.' ) ;
71
75
} )
72
76
73
- it ( 'should the component have three tags' , ( ) => {
74
- expect ( Object . keys ( docButton [ 'tags' ] ) . length ) . to . equal ( 3 )
77
+ it ( 'should the component have two tags' , ( ) => {
78
+ expect ( Object . keys ( docButton [ 'tags' ] ) . length ) . to . equal ( 2 )
79
+ } )
80
+
81
+ it ( 'should the component have four props' , ( ) => {
82
+ expect ( Object . keys ( docButton [ 'props' ] ) . length ) . to . equal ( 4 )
83
+ } )
84
+
85
+ it ( 'should the component have size prop default equal normal' , ( ) => {
86
+ expect ( docButton [ 'props' ] [ 'size' ] [ 'defaultValue' ] [ 'value' ] ) . to . equal ( '"normal"' )
87
+ } )
88
+
89
+ it ( 'should the component have size prop description equal The size of the button\n`small, normal, large`' , ( ) => {
90
+ expect ( docButton [ 'props' ] [ 'size' ] [ 'description' ] ) . to . equal ( 'The size of the button\n`small, normal, large`' )
75
91
} )
76
92
77
93
it ( 'should the component have authors' , ( ) => {
0 commit comments