@@ -5,12 +5,13 @@ const request = RSVP.denodeify(require('request'));
55const expect = require ( 'chai' ) . use ( require ( 'chai-string' ) ) . expect ;
66const { startServer, stopServer } = require ( '../../test-libs' ) ;
77
8+ const port = 44554
89describe ( 'simple acceptance' , function ( ) {
910 this . timeout ( 30000 ) ;
1011
1112 before ( function ( ) {
1213 return startServer ( {
13- command : 'serve'
14+ port ,
1415 } ) ;
1516
1617 } ) ;
@@ -21,7 +22,7 @@ describe('simple acceptance', function() {
2122
2223 it ( '/ HTML contents' , async ( ) => {
2324 const response = await request ( {
24- url : ' http://localhost:49741/' ,
25+ url : ` http://localhost:${ port } /` ,
2526 headers : {
2627 'Accept' : 'text/html'
2728 }
@@ -34,7 +35,7 @@ describe('simple acceptance', function() {
3435
3536 it ( 'with fastboot query parameter turned on' , async ( ) => {
3637 const response = await request ( {
37- url : ' http://localhost:49741 /?fastboot=true' ,
38+ url : ` http://localhost:${ port } /?fastboot=true` ,
3839 headers : {
3940 'Accept' : 'text/html'
4041 }
@@ -47,7 +48,7 @@ describe('simple acceptance', function() {
4748
4849 it ( 'with fastboot query parameter turned off' , async ( ) => {
4950 const response = await request ( {
50- url : ' http://localhost:49741 /?fastboot=false' ,
51+ url : ` http://localhost:${ port } /?fastboot=false` ,
5152 headers : {
5253 'Accept' : 'text/html'
5354 }
@@ -60,7 +61,7 @@ describe('simple acceptance', function() {
6061
6162 it ( '/posts HTML contents' , async ( ) => {
6263 const response = await request ( {
63- url : ' http://localhost:49741 /posts' ,
64+ url : ` http://localhost:${ port } /posts` ,
6465 headers : {
6566 'Accept' : 'text/html'
6667 }
@@ -74,7 +75,7 @@ describe('simple acceptance', function() {
7475
7576 it ( '/not-found HTML contents' , async ( ) => {
7677 const response = await request ( {
77- url : ' http://localhost:49741 /not-found' ,
78+ url : ` http://localhost:${ port } /not-found` ,
7879 headers : {
7980 'Accept' : 'text/html'
8081 }
@@ -87,7 +88,7 @@ describe('simple acceptance', function() {
8788
8889 it ( '/boom HTML contents' , async ( ) => {
8990 const response = await request ( {
90- url : ' http://localhost:49741 /boom' ,
91+ url : ` http://localhost:${ port } /boom` ,
9192 headers : {
9293 'Accept' : 'text/html'
9394 }
@@ -100,7 +101,7 @@ describe('simple acceptance', function() {
100101
101102 it ( '/imports HTML contents' , async ( ) => {
102103 const response = await request ( {
103- url : ' http://localhost:49741 /imports' ,
104+ url : ` http://localhost:${ port } /imports` ,
104105 headers : {
105106 'Accept' : 'text/html'
106107 }
@@ -112,15 +113,15 @@ describe('simple acceptance', function() {
112113 } ) ;
113114
114115 it ( '/assets/vendor.js' , async ( ) => {
115- const response = await request ( ' http://localhost:49741 /assets/vendor.js' )
116+ const response = await request ( ` http://localhost:${ port } /assets/vendor.js` )
116117
117118 expect ( response . statusCode ) . to . equal ( 200 ) ;
118119 expect ( response . headers [ "content-type" ] ) . to . equalIgnoreCase ( "application/javascript; charset=utf-8" ) ;
119120 expect ( response . body ) . to . contain ( "Ember =" ) ;
120121 } ) ;
121122
122123 it ( '/assets/basic-app.js' , async ( ) => {
123- const response = await request ( ' http://localhost:49741 /assets/basic-app.js' )
124+ const response = await request ( ` http://localhost:${ port } /assets/basic-app.js` )
124125
125126 expect ( response . statusCode ) . to . equal ( 200 ) ;
126127 expect ( response . headers [ "content-type" ] ) . to . equalIgnoreCase ( "application/javascript; charset=utf-8" ) ;
0 commit comments