chore: reworking tests

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-08-23 10:52:49 +02:00
parent 4c5e85ddf3
commit 9b37fc59ed
14 changed files with 180 additions and 70 deletions
@@ -51,6 +51,13 @@ jest.mock('ora', () => ({
},
}));
jest.mock('../../lib/run', () => {
return {
run: jest.fn(),
runPlain: jest.fn(),
};
});
const REGISTRY_VERSIONS: { [name: string]: string } = {
'@backstage/core': '1.0.6',
'@backstage/core-api': '1.0.7',
@@ -20,6 +20,13 @@ import * as runObj from '../run';
import { fetchPackageInfo, mapDependencies } from './packages';
import { NotFoundError } from '../errors';
jest.mock('../run', () => {
return {
run: jest.fn(),
runPlain: jest.fn(),
};
});
describe('fetchPackageInfo', () => {
afterEach(() => {
jest.resetAllMocks();