Add createServiceMock to backend-test-utils

Exports the internal simpleMock utility as createServiceMock, allowing
plugin authors to define mock creators for their own service refs
following the same pattern as the built-in mockServices mocks.

Also updates catalog-node to use createServiceMock instead of its own
copy, and simplifies the gateway-backend test to use the mock's
.factory property directly.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2026-02-09 22:29:07 +01:00
parent 9848734ce6
commit 42abfb1b85
14 changed files with 138 additions and 145 deletions
+5
View File
@@ -5399,6 +5399,11 @@ __metadata:
lodash: "npm:^4.17.21"
msw: "npm:^1.0.0"
yaml: "npm:^2.0.0"
peerDependencies:
"@backstage/backend-test-utils": "workspace:^"
peerDependenciesMeta:
"@backstage/backend-test-utils":
optional: true
languageName: unknown
linkType: soft