@@ -29,6 +29,10 @@ describe('tests grid', () => {
2929 expect ( typeof docGrid [ 'description' ] !== 'undefined' ) . to . be . true
3030 } )
3131
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+
3236 it ( 'should have methods' , ( ) => {
3337 expect ( typeof docGrid [ 'methods' ] !== 'undefined' ) . to . be . true
3438 } )
@@ -56,7 +60,7 @@ describe('tests grid', () => {
5660
5761describe ( 'tests button' , ( ) => {
5862 docButton = api . parse ( button ) ;
59- console . log ( JSON . stringify ( docGrid , null , 2 ) ) ;
63+ console . log ( JSON . stringify ( docButton , null , 2 ) ) ;
6064
6165 it ( 'should return an object' , ( ) => {
6266 expect ( docButton ) . to . be . an ( 'object' )
@@ -70,8 +74,20 @@ describe('tests button', () => {
7074 expect ( docButton . description ) . to . equal ( 'This is an example of creating a reusable grid component and using it with external data.' ) ;
7175 } )
7276
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`' )
7591 } )
7692
7793 it ( 'should the component have authors' , ( ) => {
0 commit comments