File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
tests/test-angular-project Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ describe('TypeGuards', () => {
4444 expect ( isPet ( validPet ) ) . toBeTruthy ( ) ;
4545 expect ( isPet ( { name : 'Pes' , photoUrls : [ ] } ) ) . toBeTruthy ( ) ;
4646 expect ( isPet ( { ...validPet , category : { foo : 'bar' } } ) ) . toBeTruthy ( ) ;
47+ expect ( isPet ( { ...validPet , category : null } ) ) . toBeTruthy ( ) ;
4748 } ) ) ;
4849
4950 test ( 'invalid Pet is not Pet' , inject ( [ ] , ( ) => {
@@ -68,6 +69,7 @@ describe('TypeGuards', () => {
6869 expect ( isCustomer ( { right : Right . READ_WRITE } ) ) . toBeFalsy ( ) ;
6970 expect ( isCustomer ( { ...validCustomer , name : 42 } ) ) . toBeFalsy ( ) ;
7071 expect ( isCustomer ( { ...validCustomer , email : 42 } ) ) . toBeFalsy ( ) ; // test for interface extend
72+ expect ( isCustomer ( { ...validCustomer , name : null } ) ) . toBeFalsy ( ) ;
7173 } ) ) ;
7274
7375 test ( 'null is not valid object' , inject ( [ ] , ( ) => {
Original file line number Diff line number Diff line change @@ -564,6 +564,7 @@ definitions:
564564 format : ' int64'
565565 category :
566566 $ref : ' #/definitions/Category'
567+ x-nullable : true
567568 name :
568569 type : ' string'
569570 example : ' doggie'
@@ -597,6 +598,7 @@ definitions:
597598 properties :
598599 name :
599600 type : ' string'
601+ x-nullable : false
600602 address :
601603 type : ' string'
602604 right :
You can’t perform that action at this time.
0 commit comments