Skip to content

Commit e71afdd

Browse files
committed
making test pass
1 parent cd2f910 commit e71afdd

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

test-packages/basic-app/test/server-assets-test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ const request = RSVP.denodeify(require('request'));
55
const expect = require('chai').use(require('chai-string')).expect;
66
const { startServer, stopServer } = require('../../test-libs');
77

8+
const port = 49561;
89
describe('serve assets acceptance', function() {
910
this.timeout(20000);
1011

1112
before(function() {
1213
return startServer({
13-
command: 'serve'
14+
port,
1415
});
1516

1617
});
@@ -20,15 +21,15 @@ describe('serve assets acceptance', function() {
2021
});
2122

2223
it('/assets/vendor.js', async () => {
23-
const response = await request('http://localhost:49741/assets/vendor.js')
24+
const response = await request(`http://localhost:${port}/assets/vendor.js`)
2425

2526
expect(response.statusCode).to.equal(200);
2627
expect(response.headers["content-type"]).to.equalIgnoreCase("application/javascript; charset=utf-8");
2728
expect(response.body).to.contain("Ember =");
2829
});
2930

3031
it('/assets/basic-app.js', async () => {
31-
const response = await request('http://localhost:49741/assets/basic-app.js')
32+
const response = await request(`http://localhost:${port}/assets/basic-app.js`)
3233

3334
expect(response.statusCode).to.equal(200);
3435
expect(response.headers["content-type"]).to.equalIgnoreCase("application/javascript; charset=utf-8");

test-packages/basic-app/test/simple-test.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ const request = RSVP.denodeify(require('request'));
55
const expect = require('chai').use(require('chai-string')).expect;
66
const { startServer, stopServer } = require('../../test-libs');
77

8+
const port = 44554
89
describe('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

Comments
 (0)