-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(validation): massage config (#28458)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
- Loading branch information
1 parent
7c598d6
commit 0a43865
Showing
2 changed files
with
29 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { logger } from '../../../../logger'; | ||
import { migrateAndValidateConfig } from './util'; | ||
|
||
describe('workers/global/config/parse/util', () => { | ||
it('massages config', async () => { | ||
const config = { | ||
packageRules: [ | ||
{ | ||
description: 'haha', | ||
matchPackageNames: ['name'], | ||
enabled: false, | ||
}, | ||
], | ||
}; | ||
|
||
const migratedConfig = await migrateAndValidateConfig(config, 'global'); | ||
expect(migratedConfig?.packageRules?.[0].description).toBeArray(); | ||
expect(logger.warn).toHaveBeenCalledTimes(0); | ||
}); | ||
}); |
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