mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
16d36a15e2
Renovate config can now support the fields `npmToken`, `npmrc` and `yarnrc`. `npmrc` and `yarnrc` (note no `.` prefix) can be used as an alternative to checking the respective files into the repo and have the same effect. `npmToken` is a shorter alternative and allows for just the npm token to be added, defaulting to the public npm registry.
24 lines
679 B
JavaScript
24 lines
679 B
JavaScript
const massage = require('../../lib/config/massage.js');
|
|
|
|
describe('config/massage', () => {
|
|
describe('massageConfig', () => {
|
|
it('returns empty', () => {
|
|
const config = {};
|
|
const res = massage.massageConfig(config);
|
|
expect(res).toMatchSnapshot();
|
|
});
|
|
it('massages strings to array', () => {
|
|
const config = {
|
|
schedule: 'before 5am',
|
|
};
|
|
const res = massage.massageConfig(config);
|
|
expect(Array.isArray(res.schedule)).toBe(true);
|
|
});
|
|
it('massages npmToken', () => {
|
|
const config = {
|
|
npmToken: 'some-token',
|
|
};
|
|
expect(massage.massageConfig(config)).toMatchSnapshot();
|
|
});
|
|
});
|
|
});
|