@@ -59,9 +59,13 @@ describe('SPDY Server', function () {
5959 } , function ( err ) {
6060 assert ( ! err )
6161
62+ stream . on ( 'error' , ( err ) => {
63+ done ( err )
64+ } )
65+
6266 stream . on ( 'response' , function ( status , headers ) {
63- assert . equal ( status , 200 )
64- assert . equal ( headers . ok , 'yes' )
67+ assert . strictEqual ( status , 200 )
68+ assert . strictEqual ( headers . ok , 'yes' )
6569
6670 fixtures . expectData ( stream , 'response' , done )
6771 } )
@@ -70,8 +74,8 @@ describe('SPDY Server', function () {
7074 } )
7175
7276 server . on ( 'request' , function ( req , res ) {
73- assert . equal ( req . isSpdy , res . isSpdy )
74- assert . equal ( req . spdyVersion , res . spdyVersion )
77+ assert . strictEqual ( req . isSpdy , res . isSpdy )
78+ assert . strictEqual ( req . spdyVersion , res . spdyVersion )
7579 assert ( req . isSpdy )
7680 if ( ! plain ) {
7781 assert ( req . socket . encrypted )
@@ -82,14 +86,14 @@ describe('SPDY Server', function () {
8286 if ( version === 3.1 ) {
8387 assert ( req . spdyVersion >= 3 && req . spdyVersion <= 3.1 )
8488 } else {
85- assert . equal ( req . spdyVersion , version )
89+ assert . strictEqual ( req . spdyVersion , version )
8690 }
8791 assert ( req . spdyStream )
8892 assert ( res . spdyStream )
8993
90- assert . equal ( req . method , 'GET' )
91- assert . equal ( req . url , '/get' )
92- assert . deepEqual ( req . headers , { a : 'b' , host : 'localhost' } )
94+ assert . strictEqual ( req . method , 'GET' )
95+ assert . strictEqual ( req . url , '/get' )
96+ assert . deepStrictEqual ( req . headers , { a : 'b' , host : 'localhost' } )
9397
9498 req . on ( 'end' , function ( ) {
9599 res . writeHead ( 200 , {
@@ -110,8 +114,8 @@ describe('SPDY Server', function () {
110114 assert ( ! err )
111115
112116 stream . on ( 'response' , function ( status , headers ) {
113- assert . equal ( status , 200 )
114- assert . equal ( headers . ok , 'yes' )
117+ assert . strictEqual ( status , 200 )
118+ assert . strictEqual ( headers . ok , 'yes' )
115119
116120 fixtures . expectData ( stream , 'response' , next )
117121 } )
@@ -120,8 +124,8 @@ describe('SPDY Server', function () {
120124 } )
121125
122126 server . on ( 'request' , function ( req , res ) {
123- assert . equal ( req . method , 'POST' )
124- assert . equal ( req . url , '/post' )
127+ assert . strictEqual ( req . method , 'POST' )
128+ assert . strictEqual ( req . url , '/post' )
125129
126130 res . writeHead ( 200 , {
127131 ok : 'yes'
@@ -150,7 +154,7 @@ describe('SPDY Server', function () {
150154 assert ( ! err )
151155
152156 stream . on ( 'response' , function ( status , headers ) {
153- assert . equal ( status , 100 )
157+ assert . strictEqual ( status , 100 )
154158
155159 fixtures . expectData ( stream , 'response' , done )
156160 } )
@@ -177,7 +181,7 @@ describe('SPDY Server', function () {
177181 assert ( ! err )
178182
179183 stream . on ( 'response' , function ( status , headers ) {
180- assert . equal ( status , 100 )
184+ assert . strictEqual ( status , 100 )
181185
182186 fixtures . expectData ( stream , 'response' , done )
183187 } )
@@ -202,8 +206,8 @@ describe('SPDY Server', function () {
202206 assert ( ! err )
203207
204208 stream . on ( 'pushPromise' , function ( push ) {
205- assert . equal ( push . path , '/push' )
206- assert . equal ( push . headers . yes , 'push' )
209+ assert . strictEqual ( push . path , '/push' )
210+ assert . strictEqual ( push . headers . yes , 'push' )
207211
208212 fixtures . expectData ( push , 'push' , next )
209213 fixtures . expectData ( stream , 'response' , next )
@@ -213,8 +217,8 @@ describe('SPDY Server', function () {
213217 } )
214218
215219 server . on ( 'request' , function ( req , res ) {
216- assert . equal ( req . method , 'POST' )
217- assert . equal ( req . url , '/page' )
220+ assert . strictEqual ( req . method , 'POST' )
221+ assert . strictEqual ( req . url , '/page' )
218222
219223 res . writeHead ( 200 , {
220224 ok : 'yes'
@@ -251,8 +255,8 @@ describe('SPDY Server', function () {
251255 stream . end ( )
252256
253257 stream . on ( 'response' , function ( status , headers ) {
254- assert . equal ( status , 200 )
255- assert . equal ( headers . ok , 'yes' )
258+ assert . strictEqual ( status , 200 )
259+ assert . strictEqual ( headers . ok , 'yes' )
256260
257261 fixtures . expectData ( stream , 'response' , done )
258262 } )
@@ -262,7 +266,7 @@ describe('SPDY Server', function () {
262266 var gotHeaders = false
263267 req . on ( 'trailers' , function ( headers ) {
264268 gotHeaders = true
265- assert . equal ( headers . trai , 'ler' )
269+ assert . strictEqual ( headers . trai , 'ler' )
266270 } )
267271
268272 req . on ( 'end' , function ( ) {
@@ -285,7 +289,7 @@ describe('SPDY Server', function () {
285289 assert ( ! err )
286290
287291 stream . on ( 'response' , function ( status , headers ) {
288- assert . equal ( status , 300 )
292+ assert . strictEqual ( status , 300 )
289293
290294 fixtures . expectData ( stream , 'response' , done )
291295 } )
@@ -343,7 +347,7 @@ describe('SPDY Server', function () {
343347 server . on ( 'request' , function ( req , res ) {
344348 req . connection . on ( 'close' , function ( ) {
345349 assert . doesNotThrow ( function ( ) {
346- assert . equal ( res . push ( '/push' , { } ) , undefined )
350+ assert . strictEqual ( res . push ( '/push' , { } ) , undefined )
347351 res . end ( 'response' )
348352 } )
349353 done ( )
@@ -359,7 +363,7 @@ describe('SPDY Server', function () {
359363 assert ( ! err )
360364
361365 stream . on ( 'response' , function ( status , headers ) {
362- assert . equal ( status , 200 )
366+ assert . strictEqual ( status , 200 )
363367
364368 fixtures . expectData ( stream , 'hello world, what\'s up?' , done )
365369 } )
@@ -393,7 +397,7 @@ describe('SPDY Server', function () {
393397 } )
394398
395399 server . on ( 'request' , function ( req , res ) {
396- assert . equal ( req . headers [ 'x-forwarded-for' ] , '1.2.3.4' )
400+ assert . strictEqual ( req . headers [ 'x-forwarded-for' ] , '1.2.3.4' )
397401 req . resume ( )
398402 res . end ( )
399403 } )
@@ -421,10 +425,10 @@ describe('SPDY Server', function () {
421425
422426 it ( 'should respond to http/1.1' , function ( done ) {
423427 var server = spdy . createServer ( fixtures . keys , function ( req , res ) {
424- assert . equal ( req . isSpdy , res . isSpdy )
425- assert . equal ( req . spdyVersion , res . spdyVersion )
428+ assert . strictEqual ( req . isSpdy , res . isSpdy )
429+ assert . strictEqual ( req . spdyVersion , res . spdyVersion )
426430 assert ( ! req . isSpdy )
427- assert . equal ( req . spdyVersion , 1 )
431+ assert . strictEqual ( req . spdyVersion , 1 )
428432
429433 res . writeHead ( 200 )
430434 res . end ( )
@@ -439,7 +443,7 @@ describe('SPDY Server', function () {
439443 method : 'GET' ,
440444 path : '/'
441445 } , function ( res ) {
442- assert . equal ( res . statusCode , 200 )
446+ assert . strictEqual ( res . statusCode , 200 )
443447 res . resume ( )
444448 res . on ( 'end' , function ( ) {
445449 server . close ( done )
@@ -457,10 +461,10 @@ describe('SPDY Server', function () {
457461 util . inherits ( Pseuver , https . Server )
458462
459463 var server = spdy . createServer ( Pseuver , fixtures . keys , function ( req , res ) {
460- assert . equal ( req . isSpdy , res . isSpdy )
461- assert . equal ( req . spdyVersion , res . spdyVersion )
464+ assert . strictEqual ( req . isSpdy , res . isSpdy )
465+ assert . strictEqual ( req . spdyVersion , res . spdyVersion )
462466 assert ( ! req . isSpdy )
463- assert . equal ( req . spdyVersion , 1 )
467+ assert . strictEqual ( req . spdyVersion , 1 )
464468
465469 res . writeHead ( 200 )
466470 res . end ( )
@@ -475,7 +479,7 @@ describe('SPDY Server', function () {
475479 method : 'GET' ,
476480 path : '/'
477481 } , function ( res ) {
478- assert . equal ( res . statusCode , 200 )
482+ assert . strictEqual ( res . statusCode , 200 )
479483 res . resume ( )
480484 res . on ( 'end' , function ( ) {
481485 server . close ( done )
0 commit comments