2022-06-20 15:05:39 +00:00
|
|
|
import { updateArtifacts } from '.';
|
2019-11-28 19:04:54 +00:00
|
|
|
|
2022-03-03 09:35:26 +00:00
|
|
|
describe('modules/manager/git-submodules/artifact', () => {
|
2019-11-28 19:04:54 +00:00
|
|
|
describe('updateArtifacts()', () => {
|
|
|
|
it('returns empty content', () => {
|
2020-01-17 11:18:34 +00:00
|
|
|
expect(
|
|
|
|
updateArtifacts({
|
|
|
|
packageFileName: '',
|
2021-06-26 13:29:01 +00:00
|
|
|
updatedDeps: [{ depName: '' }],
|
2020-01-17 11:18:34 +00:00
|
|
|
newPackageFileContent: '',
|
|
|
|
config: {},
|
2023-11-07 15:50:29 +00:00
|
|
|
}),
|
2022-10-11 04:47:23 +00:00
|
|
|
).toMatchObject([{ file: { type: 'addition', path: '', contents: '' } }]);
|
2019-11-28 19:04:54 +00:00
|
|
|
});
|
2022-04-12 14:49:49 +00:00
|
|
|
|
2021-01-04 20:51:59 +00:00
|
|
|
it('returns two modules', () => {
|
|
|
|
expect(
|
|
|
|
updateArtifacts({
|
|
|
|
packageFileName: '',
|
2021-06-26 13:29:01 +00:00
|
|
|
updatedDeps: [{ depName: 'renovate' }, { depName: 'renovate-pro' }],
|
2021-01-04 20:51:59 +00:00
|
|
|
newPackageFileContent: '',
|
|
|
|
config: {},
|
2023-11-07 15:50:29 +00:00
|
|
|
}),
|
2022-10-11 04:47:23 +00:00
|
|
|
).toMatchObject([
|
2022-01-21 05:47:49 +00:00
|
|
|
{ file: { type: 'addition', path: 'renovate', contents: '' } },
|
|
|
|
{ file: { type: 'addition', path: 'renovate-pro', contents: '' } },
|
2021-08-18 06:49:27 +00:00
|
|
|
]);
|
2021-01-04 20:51:59 +00:00
|
|
|
});
|
2019-11-28 19:04:54 +00:00
|
|
|
});
|
|
|
|
});
|