File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ var options = {
12
12
var httpServer = http . createServer ( app )
13
13
var httpsServer = https . createServer ( options , app )
14
14
app . use ( '/files' , express . static ( path . join ( __dirname , '/files' ) ) )
15
+ app . get ( '/fixed-size' , ( req , res ) => res . send ( 'a quick brown fox jumps over the lazy dog' ) )
15
16
16
17
const startServer = ( app , port ) => new Promise ( ( i ) => { // eslint-disable-line
17
18
const onClose = ( ) => new Promise ( ( i ) => server . close ( i ) ) // eslint-disable-line
Original file line number Diff line number Diff line change @@ -32,4 +32,12 @@ test(async function (t) {
32
32
. toPromise ( )
33
33
t . same ( response . headers [ 'content-length' ] , '317235' )
34
34
} )
35
+
36
+ test ( async function ( t ) {
37
+ const size = await Observables
38
+ . requestContentLength ( { url : 'https://localhost:3101/fixed-size' , strictSSL : false } )
39
+ . toPromise ( )
40
+ t . same ( size , 41 )
41
+ } )
42
+
35
43
/*eslint-enable */
You can’t perform that action at this time.
0 commit comments