@@ -116,41 +116,58 @@ describe('Decorators', function () {
116116 class Obj { @D . Field ( ) someFunction ( @D . Arg ( { name : 'input' } ) input : any ) { } }
117117 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
118118 assert ( actual . name === 'input' ) ;
119+ assert ( typeof actual . isNonNull === 'undefined' ) ;
120+ assert ( typeof actual . isList === 'undefined' ) ;
119121 } ) ;
120122
121123 it ( 'sets description to ArgumentMetadata with @Description' , function ( ) {
122124 class Obj { @D . Field ( ) someFunction ( @D . Description ( 'some input' ) @D . Arg ( { name : 'input' } ) input : any ) { } }
123125 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
124126 assert ( actual . name === 'input' ) ;
125127 assert ( actual . description === 'some input' ) ;
128+ assert ( typeof actual . isNonNull === 'undefined' ) ;
129+ assert ( typeof actual . isList === 'undefined' ) ;
126130 } ) ;
127131
128132 it ( 'sets description to ArgumentMetadata with description option' , function ( ) {
129133 class Obj { @D . Field ( ) someFunction ( @D . Arg ( { name : 'input' , description : 'some input' } ) input : any ) { } }
130134 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
131135 assert ( actual . name === 'input' ) ;
132136 assert ( actual . description === 'some input' ) ;
137+ assert ( typeof actual . isNonNull === 'undefined' ) ;
138+ assert ( typeof actual . isList === 'undefined' ) ;
133139 } ) ;
134140
135141 it ( 'sets isNonNull to ArgumentMetadata with @NonNull' , function ( ) {
136142 class Obj { @D . Field ( ) someFunction ( @D . NonNull ( ) @D . Arg ( { name : 'input' } ) input : any ) { } }
137143 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
138144 assert ( actual . name === 'input' ) ;
139145 assert ( actual . isNonNull === true ) ;
146+ assert ( typeof actual . isList === 'undefined' ) ;
140147 } ) ;
141148
142149 it ( 'sets isNonNull to ArgumentMetadata with nonNull option' , function ( ) {
143150 class Obj { @D . Field ( ) someFunction ( @D . Arg ( { name : 'input' , nonNull : true } ) input : any ) { } }
144151 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
145152 assert ( actual . name === 'input' ) ;
146153 assert ( actual . isNonNull === true ) ;
154+ assert ( typeof actual . isList === 'undefined' ) ;
147155 } ) ;
148156
149157 it ( 'sets isNonNull to ArgumentMetadata with @List' , function ( ) {
150158 class Obj { @D . Field ( ) someFunction ( @D . List ( ) @D . Arg ( { name : 'input' } ) input : any ) { } }
151159 const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
152160 assert ( actual . name === 'input' ) ;
161+ assert ( typeof actual . isNonNull === 'undefined' ) ;
153162 assert ( actual . isList === true ) ;
154163 } ) ;
164+
165+ it ( 'sets isNonNull to ArgumentMetadata with isList' , function ( ) {
166+ class Obj { @D . Field ( ) someFunction ( @D . Arg ( { name : 'input' , isList : true } ) input : any ) { } }
167+ const actual = getFieldMetadata ( Obj . prototype , 'someFunction' ) . args [ 0 ] ;
168+ assert ( actual . name === 'input' ) ;
169+ assert ( typeof actual . isNonNull === 'undefined' ) ;
170+ assert ( actual . isList === true ) ;
171+ } ) ;
155172 } ) ;
156173} ) ;
0 commit comments