File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1395,6 +1395,7 @@ describe('Request', () => {
13951395 it ( 'handles hostname in HTTP request resource' , async ( ) => {
13961396
13971397 const server = Hapi . server ( { debug : false } ) ;
1398+ const team = new Teamwork . Team ( ) ;
13981399
13991400 let hostname ;
14001401 server . route ( {
@@ -1403,13 +1404,14 @@ describe('Request', () => {
14031404 handler : ( request ) => {
14041405
14051406 hostname = request . info . hostname ;
1407+ team . attend ( ) ;
14061408 return null ;
14071409 }
14081410 } ) ;
14091411
14101412 await server . start ( ) ;
14111413 const socket = Net . createConnection ( server . info . port , '127.0.0.1' , ( ) => socket . write ( 'GET http://host.com\r\n\r\n' ) ) ;
1412- await Hoek . wait ( 10 ) ;
1414+ await team . work ;
14131415 socket . destroy ( ) ;
14141416 await server . stop ( ) ;
14151417 expect ( hostname ) . to . equal ( 'host.com' ) ;
You can’t perform that action at this time.
0 commit comments