File tree 2 files changed +4
-0
lines changed
tests/test-angular-project
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ describe('TypeGuards', () => {
44
44
expect ( isPet ( validPet ) ) . toBeTruthy ( ) ;
45
45
expect ( isPet ( { name : 'Pes' , photoUrls : [ ] } ) ) . toBeTruthy ( ) ;
46
46
expect ( isPet ( { ...validPet , category : { foo : 'bar' } } ) ) . toBeTruthy ( ) ;
47
+ expect ( isPet ( { ...validPet , category : null } ) ) . toBeTruthy ( ) ;
47
48
} ) ) ;
48
49
49
50
test ( 'invalid Pet is not Pet' , inject ( [ ] , ( ) => {
@@ -68,6 +69,7 @@ describe('TypeGuards', () => {
68
69
expect ( isCustomer ( { right : Right . READ_WRITE } ) ) . toBeFalsy ( ) ;
69
70
expect ( isCustomer ( { ...validCustomer , name : 42 } ) ) . toBeFalsy ( ) ;
70
71
expect ( isCustomer ( { ...validCustomer , email : 42 } ) ) . toBeFalsy ( ) ; // test for interface extend
72
+ expect ( isCustomer ( { ...validCustomer , name : null } ) ) . toBeFalsy ( ) ;
71
73
} ) ) ;
72
74
73
75
test ( 'null is not valid object' , inject ( [ ] , ( ) => {
Original file line number Diff line number Diff line change @@ -564,6 +564,7 @@ definitions:
564
564
format : ' int64'
565
565
category :
566
566
$ref : ' #/definitions/Category'
567
+ x-nullable : true
567
568
name :
568
569
type : ' string'
569
570
example : ' doggie'
@@ -597,6 +598,7 @@ definitions:
597
598
properties :
598
599
name :
599
600
type : ' string'
601
+ x-nullable : false
600
602
address :
601
603
type : ' string'
602
604
right :
You can’t perform that action at this time.
0 commit comments