File tree 2 files changed +4
-3
lines changed 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ export function getServer(
108
108
app . disable ( 'x-powered-by' ) ;
109
109
110
110
// Disable Express eTag response header
111
- app . disable ( 'etag' ) ;
111
+ app . set ( 'etag' , false ) ;
112
112
113
113
if (
114
114
functionSignatureType === 'event' ||
Original file line number Diff line number Diff line change @@ -101,11 +101,12 @@ describe('HTTP Function', () => {
101
101
const st = supertest ( getTestServer ( 'testHttpFunction' ) ) ;
102
102
await ( test . httpVerb === 'GET'
103
103
? st . get ( test . path )
104
- : st . post ( test . path ) . send ( { text : 'hello' } )
104
+ : st . post ( test . path ) . send ( { text : 'hello' } )
105
105
)
106
106
. set ( 'Content-Type' , 'application/json' )
107
107
. expect ( test . expectedBody )
108
- . expect ( test . expectedStatus ) ;
108
+ . expect ( test . expectedStatus )
109
+ . expect ( res => assert ( ! res . get ( 'etag' ) ) ) ;
109
110
assert . strictEqual ( callCount , test . expectedCallCount ) ;
110
111
} ) ;
111
112
} ) ;
You can’t perform that action at this time.
0 commit comments