File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,11 @@ class CSS extends Test {
8181 }
8282
8383 protected isCached ( result : any ) : boolean {
84- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'cache-control' ) ;
84+ return result . response . headers . has ( 'cache-control' ) ;
8585 }
8686
8787 protected hasXContentTypeOptionsHeader ( result : any ) : boolean {
88- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'x-content-type-options' ) ;
88+ return result . response . headers . has ( 'x-content-type-options' ) ;
8989 }
9090
9191 protected isMinified ( result : any ) : boolean {
Original file line number Diff line number Diff line change @@ -73,11 +73,11 @@ class Image extends Test {
7373 }
7474
7575 protected isCached ( result : any ) : boolean {
76- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'cache-control' ) ;
76+ return result . response . headers . has ( 'cache-control' ) ;
7777 }
7878
7979 protected hasXContentTypeOptionsHeader ( result : any ) : boolean {
80- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'x-content-type-options' ) ;
80+ return result . response . headers . has ( 'x-content-type-options' ) ;
8181 }
8282}
8383
Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ class JavaScript extends Test {
3131
3232 const result = await request . get ( script ) ;
3333
34+ console . log ( result . response . headers ) ;
35+ console . log ( Object . prototype . hasOwnProperty . call ( result . response . headers , 'cache-control' ) ) ;
36+ console . log ( 'cache-control' in result . response . headers )
37+ console . log ( result . response . headers . has ( 'cache-control' ) )
38+
3439 const isFileAvailabe = {
3540 status : this . isFileAvailable ( result ) ? 'SUCCESS' : 'ERROR' ,
3641 title : 'Available' ,
@@ -88,11 +93,11 @@ class JavaScript extends Test {
8893 }
8994
9095 protected isCached ( result : any ) : boolean {
91- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'cache-control' ) ;
96+ return result . response . headers . has ( 'cache-control' ) ;
9297 }
9398
9499 protected hasXContentTypeOptionsHeader ( result : any ) : boolean {
95- return Object . prototype . hasOwnProperty . call ( result . response . headers , 'x-content-type-options' ) ;
100+ return result . response . headers . has ( 'x-content-type-options' ) ;
96101 }
97102
98103 protected isMinified ( result : any ) : boolean {
You can’t perform that action at this time.
0 commit comments