renovate/lib/modules/datasource/common.spec.ts
MartijnLeijssen-TomTom f611217289
feat(datasource/conan): add sourceUrl when artifactory is used (#22656)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-06-15 15:56:54 +00:00

22 lines
657 B
TypeScript

import type { HttpResponse } from '../../util/http/types';
import { isArtifactoryServer } from './common';
describe('modules/datasource/common', () => {
it('is artifactory server invalid', () => {
const response: HttpResponse<string> = {
statusCode: 200,
body: 'test',
headers: { 'invalid-header': 'version' },
};
expect(isArtifactoryServer(response)).toBeFalse();
});
it('is artifactory server valid', () => {
const response: HttpResponse<string> = {
statusCode: 200,
body: 'test',
headers: { 'x-jfrog-version': 'version' },
};
expect(isArtifactoryServer(response)).toBeTrue();
});
});