fixed last failing test in backend-common

Signed-off-by: Simon <simme.jakobsson@gmail.com>
This commit is contained in:
Simon
2022-11-14 19:11:19 +01:00
parent e9ad86dd82
commit 1fcd60eb4d
@@ -26,6 +26,7 @@ import { getVoidLogger } from '../logging';
import { GitlabUrlReader } from './GitlabUrlReader';
import { DefaultReadTreeResponseFactory } from './tree';
import { NotModifiedError, NotFoundError } from '@backstage/errors';
import getRawBody from 'raw-body';
import {
GitLabIntegration,
readGitLabIntegrationConfig,
@@ -151,7 +152,8 @@ describe('GitlabUrlReader', () => {
});
const data = await reader.readUrl(url);
const res = await JSON.parse(data.toString());
const fromStream = await getRawBody(data.stream!());
const res = await JSON.parse(fromStream.toString());
expect(res).toEqual(response);
});