Add @backstage/cli to changeset, remove cli-common mock from create-app test
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
'@backstage/cli-node': patch
|
||||
'@backstage/backend-dynamic-feature-service': patch
|
||||
'@backstage/codemods': patch
|
||||
|
||||
@@ -30,22 +30,6 @@ const MOCK_TARGET_DIR = '/mock/target-dir';
|
||||
const MOCK_TARGET_ROOT = '/mock/target-root';
|
||||
overrideTargetPaths({ dir: MOCK_TARGET_DIR, rootDir: MOCK_TARGET_ROOT });
|
||||
|
||||
jest.mock('@backstage/cli-common', () => {
|
||||
const pathModule = require('node:path');
|
||||
const actual = jest.requireActual('@backstage/cli-common');
|
||||
const MOCK_CREATE_APP_ROOT = '/mock/create-app-root';
|
||||
const mockOwnPaths = {
|
||||
resolve: (...paths: string[]) =>
|
||||
pathModule.join(MOCK_CREATE_APP_ROOT, ...paths),
|
||||
resolveRoot: (...paths: string[]) =>
|
||||
pathModule.join('/mock/monorepo-root', ...paths),
|
||||
};
|
||||
return {
|
||||
...actual,
|
||||
findOwnPaths: () => mockOwnPaths,
|
||||
};
|
||||
});
|
||||
|
||||
// By mocking this the filesystem mocks won't mess with reading all of the package.jsons
|
||||
jest.mock('./lib/versions', () => ({
|
||||
packageVersions: { root: '1.0.0' },
|
||||
|
||||
Reference in New Issue
Block a user