diff --git a/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts b/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts index 6b3f8e270f..488a258388 100644 --- a/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts +++ b/packages/backend-test-utils/src/next/wiring/TestBackend.test.ts @@ -16,16 +16,25 @@ import { createBackendModule, + createExtensionPoint, createServiceFactory, createServiceRef, } from '@backstage/backend-plugin-api'; import { startTestBackend } from './TestBackend'; describe('TestBackend', () => { - it('should get a type error if service implementation does not match', () => { - const serviceRef = createServiceRef<{ a: string; b: string }>({ id: 'a' }); - const backend = startTestBackend({ + it('should get a type error if service implementation does not match', async () => { + type Obj = { a: string; b: string }; + const serviceRef = createServiceRef({ id: 'a' }); + const extensionPoint1 = createExtensionPoint({ id: 'b1' }); + const extensionPoint2 = createExtensionPoint({ id: 'b2' }); + const extensionPoint3 = createExtensionPoint({ id: 'b3' }); + const extensionPoint4 = createExtensionPoint({ id: 'b4' }); + const extensionPoint5 = createExtensionPoint({ id: 'b5' }); + await startTestBackend({ services: [ + // @ts-expect-error + [extensionPoint1, { a: 'a' }], [serviceRef, { a: 'a' }], [serviceRef, { a: 'a', b: 'b' }], // @ts-expect-error @@ -35,8 +44,20 @@ describe('TestBackend', () => { // @ts-expect-error [serviceRef, { a: 'a', b: 'b', c: 'c' }], ], + extensionPoints: [ + // @ts-expect-error + [serviceRef, { a: 'a' }], + [extensionPoint1, { a: 'a' }], + [extensionPoint2, { a: 'a', b: 'b' }], + // @ts-expect-error + [extensionPoint3, { c: 'c' }], + // @ts-expect-error + [extensionPoint4, { a: 'a', c: 'c' }], + // @ts-expect-error + [extensionPoint5, { a: 'a', b: 'b', c: 'c' }], + ], }); - expect(backend).toBeDefined(); + expect(1).toBe(1); }); it('should start the test backend', async () => {