Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Mar 8, 2022
1 parent df5cf47 commit 80d42d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/modules/versioning/maven/compare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ function rangeToStr(fullRange: Range[] | null): string | null {
function tokensToStr(tokens: Token[]): string {
return tokens.reduce((result, token, idx) => {
const prefix = token.prefix === PREFIX_DOT ? '.' : '-';
return `${result}${idx !== 0 && token.val !== '' ? prefix : ''}${
token.val
}`;
return `${result}${
idx !== 0 && token.val !== '' ? prefix : ''
}${token.val.toString()}`;
}, '');
}

Expand Down
5 changes: 4 additions & 1 deletion lib/modules/versioning/pep440/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ function getFutureVersion(
return toPart;
}
if (index === policy) {
return toPart + (baseVersion === undefined ? 0 : 1);
if (baseVersion === undefined) {
return toPart + 0;
}
return toPart + 1;
}
return 0;
});
Expand Down
8 changes: 6 additions & 2 deletions lib/util/http/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,17 @@ describe('util/http/index', () => {
foo = true;
fooStart();
return fooResp;
})
});
httpMock
.scope(baseUrl)
.get('/bar')
.reply(200, () => {
bar = true;
barStart();
return barResp;
})
});
httpMock
.scope(baseUrl)
.get('/baz')
.reply(200, () => {
baz = true;
Expand Down

0 comments on commit 80d42d8

Please sign in to comment.