Skip to content

Commit

Permalink
Add test case which covers commodore-helm's defaultConfig.fileMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Jan 31, 2025
1 parent d057e04 commit 7140e08
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/commodore-helm/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { loadFixture, getFixturePath, getLoggerErrors } from '../test/util';
import { extractPackageFile, extractAllPackageFiles } from './index';
import { defaultConfig, extractPackageFile, extractAllPackageFiles } from './index';
import { beforeEach, expect, describe, it } from '@jest/globals';

import { GlobalConfig } from 'renovate/dist/config/global';
Expand Down Expand Up @@ -325,5 +325,14 @@ describe('manager/commodore-helm/index', () => {
}
}
});
it("doesn't match golden test files as files to renovate", async() => {
expect(defaultConfig.fileMatch.length).toBe(1);
const re = new RegExp(defaultConfig.fileMatch[0]);
expect(re.test('class/defaults.yml')).toBe(true);
expect(re.test('class/component-name.yml')).toBe(true);
expect(re.test('class/name.yaml')).toBe(true);
expect(re.test('tests/golden/storageclass/sc.yaml')).toBe(false);
expect(re.test('tests/golden/class/class.yaml')).toBe(false);
});
});
});

0 comments on commit 7140e08

Please sign in to comment.