Skip to content

Commit

Permalink
update lib/workers/repository/process/lookup/index.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Ladzaretti committed Mar 21, 2023
1 parent 5f9c3fa commit 3b30ee6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/workers/repository/process/lookup/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1987,29 +1987,23 @@ describe('workers/repository/process/lookup/index', () => {
});

describe('handles merge confidence', () => {
const defaultApiBaseUrl = 'https://badges.renovateapi.com/';
const getMergeConfidenceSpy = jest.spyOn(
McApi,
'getMergeConfidenceLevel'
);
const apiBaseUrl = 'https://www.baseurl.com/';
const envOrg: NodeJS.ProcessEnv = process.env;
const hostRule: HostRule = {
hostType: 'merge-confidence',
token: 'some-token',
};

beforeEach(() => {
process.env = {
...envOrg,
RENOVATE_X_MERGE_CONFIDENCE_API_BASE_URL: apiBaseUrl,
};
hostRules.add(hostRule);
initConfig();
memCache.reset();
});

afterEach(() => {
process.env = envOrg;
hostRules.clear();
resetConfig();
});
Expand All @@ -2028,7 +2022,7 @@ describe('workers/repository/process/lookup/index', () => {
.get('/webpack')
.reply(200, webpackJson);
httpMock
.scope(apiBaseUrl)
.scope(defaultApiBaseUrl)
.get(
`/api/mc/json/${datasource}/${packageName}/${currentValue}/${newVersion}`
)
Expand Down

0 comments on commit 3b30ee6

Please sign in to comment.