Skip to content

Commit

Permalink
fix failing test, fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiAndreiev committed Aug 20, 2024
1 parent f1eb43e commit f49a707
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/node/src/lib/get-project-base-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export async function getProjectBaseUrl(readmeApiKey: string, requestTimeout = c
throw res;
}
const logLevel = res.ok ? 'info' : 'error';
logger[logLevel]({ message: `Fetch Base URL: Service responded with status ${res.status}: ${res.statusText}.` });
logger[logLevel]({
message: `Fetch Base URL: Service responded with status ${res.status}: ${res.statusText}.`,
});
return res.json() as Promise<{ baseUrl: string }>;
})
.then(project => {
Expand Down
2 changes: 1 addition & 1 deletion packages/node/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ describe('#metrics', function () {
it('should log response status after the metrics server responds', async function () {
metricsServerResponseCode = 202;
await makeRequest();
expect(mockLogger.debug).toHaveBeenCalledWith({
expect(mockLogger.info).toHaveBeenCalledWith({
message: expect.stringContaining(`Service responded with status ${metricsServerResponseCode}`),
});
});
Expand Down

0 comments on commit f49a707

Please sign in to comment.