mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-11 22:46:27 +00:00
ccb66310b1
Repository initialisation is refactored so that all package files and their content is retrieved up-front before an renovating begins. This allows us to know both how many package files as well as determine if there is renovate json in a package.json before triggering the onboarding PR. Closes #634
34 lines
824 B
JavaScript
34 lines
824 B
JavaScript
const configSerializer = require('../../lib/logger/config-serializer');
|
|
|
|
describe('logger/config-serializer', () => {
|
|
it('redacts sensitive fields', () => {
|
|
const config = {
|
|
token: 'a',
|
|
nottoken: 'b',
|
|
githubAppKey: 'c',
|
|
};
|
|
expect(configSerializer(config)).toMatchSnapshot();
|
|
});
|
|
it('replaces functions', () => {
|
|
const config = {
|
|
api: 'a',
|
|
nottoken: 'b',
|
|
logger: {},
|
|
};
|
|
expect(configSerializer(config)).toMatchSnapshot();
|
|
});
|
|
it('squashes templates', () => {
|
|
const config = {
|
|
api: 'a',
|
|
nottoken: 'b',
|
|
prBody: 'foo',
|
|
};
|
|
expect(configSerializer(config)).toMatchSnapshot();
|
|
});
|
|
it('suppresses content', () => {
|
|
const config = {
|
|
content: {},
|
|
};
|
|
expect(configSerializer(config)).toMatchSnapshot();
|
|
});
|
|
});
|