mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-15 09:06:25 +00:00
b4319928f1
* refactor: strict manager tests * chore: revert changes * Update lib/modules/manager/gradle/extract.spec.ts
26 lines
769 B
TypeScript
26 lines
769 B
TypeScript
import { Fixtures } from '../../../../test/fixtures';
|
|
import { extractPackageFile } from '.';
|
|
|
|
describe('modules/manager/terragrunt/extract', () => {
|
|
describe('extractPackageFile()', () => {
|
|
it('returns null for empty', () => {
|
|
expect(extractPackageFile('nothing here')).toBeNull();
|
|
});
|
|
|
|
it('extracts terragrunt sources', () => {
|
|
const res = extractPackageFile(Fixtures?.get('2.hcl'));
|
|
expect(res).toMatchSnapshot();
|
|
expect(res?.deps).toHaveLength(30);
|
|
expect(res?.deps.filter((dep) => dep.skipReason)).toHaveLength(5);
|
|
});
|
|
|
|
it('returns null if only local terragrunt deps', () => {
|
|
expect(
|
|
extractPackageFile(`terragrunt {
|
|
source = "../fe"
|
|
}
|
|
`)
|
|
).toBeNull();
|
|
});
|
|
});
|
|
});
|