mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-03 02:39:06 +00:00
18 lines
501 B
TypeScript
18 lines
501 B
TypeScript
import { getParentName } from './utils';
|
|
|
|
describe('config/validation-helpers/utils', () => {
|
|
describe('getParentName()', () => {
|
|
it('ignores encrypted in root', () => {
|
|
expect(getParentName('encrypted')).toBeEmptyString();
|
|
});
|
|
|
|
it('handles array types', () => {
|
|
expect(getParentName('hostRules[1]')).toBe('hostRules');
|
|
});
|
|
|
|
it('handles encrypted within array types', () => {
|
|
expect(getParentName('hostRules[0].encrypted')).toBe('hostRules');
|
|
});
|
|
});
|
|
});
|