Skip to content
Snippets Groups Projects
Commit 2e0b2965 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

chore: add datasource getters

parent 14be7f39
No related merge requests found
......@@ -12,6 +12,10 @@ jest.mock('./npm');
const npmDatasource: any = _npm;
describe('datasource/index', () => {
it('returns datasources', () => {
expect(datasource.getDatasources()).toBeDefined();
expect(datasource.getDatasourceList()).toBeDefined();
});
it('returns if digests are supported', () => {
expect(datasource.supportsDigests({ datasource: DATASOURCE_GITHUB })).toBe(
true
......
......@@ -16,6 +16,9 @@ import { loadModules } from '../util/modules';
export * from './common';
const datasources = loadModules<Datasource>(__dirname);
export const getDatasources = (): Record<string, Datasource> => datasources;
const datasourceList = Object.keys(datasources);
export const getDatasourceList = (): string[] => datasourceList;
const cacheNamespace = 'datasource-releases';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment