@@ -26,7 +26,13 @@ describe('Types', () => {
2626 const clazz : string = status [ `${ number } _CLASS` ] as string
2727 clazz . should . eql ( '1xx' )
2828 } )
29-
29+
30+ it ( 'undefined status codes' , ( ) => {
31+ const undefinedStatusCode = 777
32+ const code : string = typeof status [ undefinedStatusCode ]
33+ code . should . eql ( 'undefined' )
34+ } )
35+
3036 it ( 'sub level properties' , ( ) => {
3137 const number : number = status . extra . nginx . NO_RESPONSE
3238 const code : string = status . extra . nginx [ number ] as string
@@ -38,41 +44,41 @@ describe('Types', () => {
3844 const clazz : string = status . extra . nginx [ `${ number } _CLASS` ] as string
3945 clazz . should . eql ( '4xx' )
4046 } )
41-
47+
4248 } )
43-
49+
4450 describe ( 'ES6 exports' , ( ) => {
45-
51+
4652 it ( 'HttpStatus' , ( ) => {
4753 const statuses : HttpStatus = status
4854 statuses . CONTINUE . should . be . a . Number ( )
4955 } )
50-
56+
5157 it ( 'HttpStatusClasses' , ( ) => {
5258 const classes : HttpStatusClasses = status . classes
5359 classes . INFORMATIONAL . should . be . a . String ( )
5460 } )
55-
61+
5662 it ( 'HttpStatusUnofficial' , ( ) => {
5763 const unofficial : HttpStatusUnofficial = status . extra . unofficial
5864 unofficial . CHECKPOINT . should . be . a . Number ( )
5965 } )
60-
66+
6167 it ( 'HttpStatusIis' , ( ) => {
6268 const iis : HttpStatusIis = status . extra . iis
6369 iis . LOGIN_TIME_OUT . should . be . a . Number ( )
6470 } )
65-
71+
6672 it ( 'HttpStatusNginx' , ( ) => {
6773 const nginx : HttpStatusNginx = status . extra . nginx
6874 nginx . NO_RESPONSE . should . be . a . Number ( )
6975 } )
70-
76+
7177 it ( 'HttpStatusCloudfare' , ( ) => {
7278 const cloudflare : HttpStatusCloudfare = status . extra . cloudflare
7379 cloudflare . UNKNOWN_ERROR . should . be . a . Number ( )
7480 } )
75-
81+
7682 } )
7783
7884} )
0 commit comments