update test for build server (#24)

This commit is contained in:
Lynn 2017-02-26 18:47:23 -08:00 committed by GitHub
parent d4ef876828
commit 1c078fb2f8
3 changed files with 12 additions and 3 deletions

View File

@ -1,11 +1,17 @@
const path = require('path');
// use config provided by test framework
function pathToConfigDir() {
return path.join(__dirname, '..');
return path.join(__dirname, '/../fixtures');
}
const app = {
getAppPath: pathToConfigDir,
getPath: pathToConfigDir
getPath: function(type) {
if (type === 'exe') {
return path.join(pathToConfigDir(), '/Symphony.exe');
}
return pathToConfigDir();
}
}
module.exports = {

3
tests/fixtures/config/Symphony.config vendored Normal file
View File

@ -0,0 +1,3 @@
{
"url": "https://my.symphony.com"
}

View File

@ -10,6 +10,6 @@ jest.mock('../js/utils', function() {
test('getConfig should have proper url', function() {
return getConfig(false).then(function(result) {
expect(result.url).toBe('https://foundation-dev.symphony.com');
expect(result.url).toBe('https://my.symphony.com');
});
});