0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-15 00:42:26 +00:00
renovatebot_renovate/lib/modules/manager/circleci/index.spec.ts
RahulGautamSingh bc7d0595d0
feat(config): managerFilePatterns (#34615)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-04 08:30:24 +00:00

26 lines
1 KiB
TypeScript

import { matchRegexOrGlobList } from '../../../util/string-match';
import { defaultConfig } from '.';
describe('modules/manager/circleci/index', () => {
describe('file names match managerFilePatterns', () => {
it.each`
path | expected
${'.circleci/config.yml'} | ${true}
${'.circleci/config.yaml'} | ${true}
${'.circleci/foo.yaml'} | ${true}
${'.circleci/foo.yml'} | ${true}
${'.circleci/foo/config.yaml'} | ${true}
${'.circleci/foo/bar.yml'} | ${true}
${'foo/.circleci/bar.yaml'} | ${true}
${'foo.yml'} | ${false}
${'circleci/foo.yml'} | ${false}
${'circleci/foo.yml'} | ${false}
${'.circleci_foo/bar.yml'} | ${false}
${'.circleci/foo.toml'} | ${false}
`('matchRegexOrGlobList("$path") === $expected', ({ path, expected }) => {
expect(
matchRegexOrGlobList(path, defaultConfig.managerFilePatterns),
).toBe(expected);
});
});
});