renovate/lib/manager/terragrunt/util.spec.ts
2021-04-13 12:07:57 +02:00

27 lines
1,001 B
TypeScript

import { getName } from '../../../test/util';
import { TerragruntDependencyTypes, getTerragruntDependencyType } from './util';
describe(getName(__filename), () => {
describe('getTerragruntDependencyType()', () => {
it('returns TerragruntDependencyTypes.terragrunt', () => {
expect(getTerragruntDependencyType('terraform')).toBe(
TerragruntDependencyTypes.terragrunt
);
});
it('returns TerragruntDependencyTypes.unknown', () => {
expect(getTerragruntDependencyType('unknown')).toBe(
TerragruntDependencyTypes.unknown
);
});
it('returns TerragruntDependencyTypes.unknown on empty string', () => {
expect(getTerragruntDependencyType('')).toBe(
TerragruntDependencyTypes.unknown
);
});
it('returns TerragruntDependencyTypes.unknown on string with random chars', () => {
expect(getTerragruntDependencyType('sdfsgdsfadfhfghfhgdfsdf')).toBe(
TerragruntDependencyTypes.unknown
);
});
});
});