File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1395,6 +1395,7 @@ describe('Request', () => {
1395
1395
it ( 'handles hostname in HTTP request resource' , async ( ) => {
1396
1396
1397
1397
const server = Hapi . server ( { debug : false } ) ;
1398
+ const team = new Teamwork . Team ( ) ;
1398
1399
1399
1400
let hostname ;
1400
1401
server . route ( {
@@ -1403,13 +1404,14 @@ describe('Request', () => {
1403
1404
handler : ( request ) => {
1404
1405
1405
1406
hostname = request . info . hostname ;
1407
+ team . attend ( ) ;
1406
1408
return null ;
1407
1409
}
1408
1410
} ) ;
1409
1411
1410
1412
await server . start ( ) ;
1411
1413
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 ;
1413
1415
socket . destroy ( ) ;
1414
1416
await server . stop ( ) ;
1415
1417
expect ( hostname ) . to . equal ( 'host.com' ) ;
You can’t perform that action at this time.
0 commit comments