@@ -20,14 +20,14 @@ function shouldIncludeStackWithThisFile(err) {
20
20
describe ( 'request(url)' , function ( ) {
21
21
it ( 'should be supported' , function ( done ) {
22
22
const app = express ( ) ;
23
- let s ;
23
+ let server ;
24
24
25
25
app . get ( '/' , function ( req , res ) {
26
26
res . send ( 'hello' ) ;
27
27
} ) ;
28
28
29
- s = app . listen ( function ( ) {
30
- const url = 'http://localhost:' + s . address ( ) . port ;
29
+ server = app . listen ( function ( ) {
30
+ const url = 'http://localhost:' + server . address ( ) . port ;
31
31
request ( url )
32
32
. get ( '/' )
33
33
. expect ( 'hello' , done ) ;
@@ -37,14 +37,14 @@ describe('request(url)', function () {
37
37
describe ( '.end(cb)' , function ( ) {
38
38
it ( 'should set `this` to the test object when calling cb' , function ( done ) {
39
39
const app = express ( ) ;
40
- let s ;
40
+ let server ;
41
41
42
42
app . get ( '/' , function ( req , res ) {
43
43
res . send ( 'hello' ) ;
44
44
} ) ;
45
45
46
- s = app . listen ( function ( ) {
47
- const url = 'http://localhost:' + s . address ( ) . port ;
46
+ server = app . listen ( function ( ) {
47
+ const url = 'http://localhost:' + server . address ( ) . port ;
48
48
const test = request ( url ) . get ( '/' ) ;
49
49
test . end ( function ( err , res ) {
50
50
this . should . eql ( test ) ;
@@ -93,12 +93,13 @@ describe('request(app)', function () {
93
93
94
94
it ( 'should work with remote server' , function ( done ) {
95
95
const app = express ( ) ;
96
+ let server ;
96
97
97
98
app . get ( '/' , function ( req , res ) {
98
99
res . send ( 'hey' ) ;
99
100
} ) ;
100
101
101
- app . listen ( 4001 , function ( ) {
102
+ server = app . listen ( 4001 , function ( ) {
102
103
request ( 'http://localhost:4001' )
103
104
. get ( '/' )
104
105
. end ( function ( err , res ) {
0 commit comments