-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Bauer-Xcel-Media/development
Post review fixes
- Loading branch information
Showing
14 changed files
with
123 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,5 @@ deploy: | |
skip_cleanup: true | ||
script: | ||
- npx travis-deploy-once "npx semantic-release" | ||
on: | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
'use strict'; | ||
|
||
const status = require('http-status'); | ||
const os = require('os'); | ||
const constants = require('../constants'); | ||
const testee = require('../../../lib/routes/about'); | ||
|
||
|
@@ -30,15 +31,18 @@ const check2 = { | |
}; | ||
|
||
it('should return a proper response when providing config data', async () => { | ||
const host = 'localhost:9000'; | ||
const host = 'localhost'; | ||
const packageJson = { | ||
author: 'John Doe', | ||
}; | ||
const config = { | ||
name: 'config_name', | ||
host, | ||
description: 'config_description', | ||
projectHome: 'config_projectHome', | ||
projectRepo: 'config_projectRepo', | ||
logsLinks: [ 'some-link-1', 'some-link-2'], | ||
statsLinks: [ 'some-link-3', 'some-link-4'], | ||
}; | ||
|
||
return expect(testee({ host }, { | ||
|
@@ -57,17 +61,23 @@ it('should return a proper response when providing config data', async () => { | |
}, config, { | ||
id: config.name, | ||
protocol: 'http', | ||
host: `http://${host}`, | ||
host, | ||
version: constants.DEFAULT_SERVICE_VERSION, | ||
owners: [ packageJson.author ], | ||
logsLinks: config.logsLinks, | ||
statsLinks: config.statsLinks, | ||
}), | ||
}); | ||
}); | ||
|
||
it('should return a proper response when providing package.json data', async () => { | ||
const host = 'localhost:9000'; | ||
const host = 'localhost'; | ||
const packageJson = { | ||
author: { name: 'John Doe', email: '[email protected]' }, | ||
contributors: [ | ||
'John Smith <[email protected]>', | ||
{ name: 'Mary Smith', email: '[email protected]' } | ||
], | ||
name: 'config_name', | ||
description: 'config_description', | ||
homepage: 'config_projectHome', | ||
|
@@ -95,9 +105,13 @@ it('should return a proper response when providing package.json data', async () | |
description: packageJson.description, | ||
id: packageJson.name, | ||
protocol: 'http', | ||
host: `http://${host}`, | ||
host: os.hostname(), | ||
version: constants.DEFAULT_SERVICE_VERSION, | ||
owners: [ `${packageJson.author.name} <${packageJson.author.email}>` ], | ||
owners: [ | ||
`${packageJson.author.name} <${packageJson.author.email}>`, | ||
packageJson.contributors[0], | ||
`${packageJson.contributors[1].name} <${packageJson.contributors[1].email}>`, | ||
], | ||
projectHome: packageJson.homepage, | ||
projectRepo: packageJson.repository.url, | ||
}), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters