Skip to content

Commit 33458eb

Browse files
committed
fix(settings): load repo configuration in tests
1 parent 0590f68 commit 33458eb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ ${this.results.reduce((x, y) => {
413413
return childPlugins
414414
}
415415

416-
getRepoOverrideConfig(repoName) {
416+
getRepoOverrideConfig (repoName) {
417417
return this.repoConfigs[`${repoName}.yml`] || this.repoConfigs[`${repoName}.yaml`] || {}
418418
}
419419

test/unit/lib/settings.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ describe('Settings Tests', () => {
152152
})
153153

154154
it('Picks up a repository defined in file using the .yaml extension', () => {
155-
const settings = createSettings(stubConfig)
155+
settings = createSettings(stubConfig)
156+
settings.repoConfigs = stubConfig.repoConfigs
156157
const repoConfig = settings.getRepoOverrideConfig('repository')
157158

158159
expect(typeof repoConfig).toBe('object')
@@ -171,7 +172,8 @@ describe('Settings Tests', () => {
171172
})
172173

173174
it('Picks up a repository defined in file using the .yml extension', () => {
174-
const settings = createSettings(stubConfig)
175+
settings = createSettings(stubConfig)
176+
settings.repoConfigs = stubConfig.repoConfigs
175177
const repoConfig = settings.getRepoOverrideConfig('repository')
176178

177179
expect(typeof repoConfig).toBe('object')

0 commit comments

Comments
 (0)