Skip to content

Commit 5378de7

Browse files
committed
Add server URL to tests
1 parent f8b1d9f commit 5378de7

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

spec/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ var DatabaseAdapter = require('../src/DatabaseAdapter');
1111

1212
var databaseURI = process.env.DATABASE_URI;
1313
var cloudMain = process.env.CLOUD_CODE_MAIN || './cloud/main.js';
14+
var port = 8378;
1415

1516
// Default server configuration for tests.
1617
var defaultConfiguration = {
1718
databaseURI: databaseURI,
1819
cloud: cloudMain,
20+
serverURL: 'http://localhost:' + port + '/1',
1921
appId: 'test',
2022
javascriptKey: 'test',
2123
dotNetKey: 'windows',
@@ -36,7 +38,6 @@ var defaultConfiguration = {
3638
var api = new ParseServer(defaultConfiguration);
3739
var app = express();
3840
app.use('/1', api);
39-
var port = 8378;
4041
var server = app.listen(port);
4142

4243
// Prevent reinitializing the server from clobbering Cloud Code

spec/index.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ describe('server', () => {
1010
it('fails if database is unreachable', done => {
1111
setServerConfiguration({
1212
databaseURI: 'mongodb://fake:[email protected]:43605/drew3',
13+
serverURL: 'http://localhost:8378/1',
1314
appId: 'test',
1415
javascriptKey: 'test',
1516
dotNetKey: 'windows',

0 commit comments

Comments
 (0)