Merge pull request #32771 from backstage/rugvip/create-service-mock

backend-test-utils: add `createServiceMock`
This commit is contained in:
Patrik Oldsberg
2026-02-10 16:38:40 +01:00
committed by GitHub
18 changed files with 210 additions and 176 deletions
@@ -0,0 +1,5 @@
---
'@backstage/backend-test-utils': minor
---
Added `createServiceMock`, a public utility for creating `ServiceMock` instances for custom service refs. This allows plugin authors to define mock creators for their own services following the same pattern as the built-in `mockServices` mocks.
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-node': patch
---
Updated `catalogServiceMock.mock` to use `createServiceMock` from `@backstage/backend-test-utils`, replacing the internal copy of `simpleMock`. Added `@backstage/backend-test-utils` as an optional peer dependency.
@@ -2,4 +2,4 @@
'@backstage/repo-tools': patch
---
The `type-deps` command now detects ambient global types from the `jest` namespace in declaration files, rather than only looking for explicit imports and reference directives.
The `type-deps` command now follows relative imports and re-exports into declaration chunk files, and detects ambient global types such as the `jest` namespace.