Skip to content

Commit

Permalink
fix(config): revert changes to lib/config/index.js
Browse files Browse the repository at this point in the history
These changes broke smoke tests.
  • Loading branch information
Jordi Gutiérrez Hermoso committed May 9, 2023
1 parent 546b9b1 commit ed2261e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,10 @@ Config.prototype.applications = function applications() {
return apps
}

if (apps && typeof apps === 'string') {
return [apps]
}

return []
}

Expand Down
7 changes: 7 additions & 0 deletions test/unit/config/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,11 @@ tap.test('#publicSettings', (t) => {

t.end()
})

t.test('should turn the app name into an array', (t) => {
configuration = Config.initialize({ app_name: 'test app name' })
t.same(configuration.applications(), ['test app name'])

t.end()
})
})

0 comments on commit ed2261e

Please sign in to comment.