Skip to main content
Version: Next

ServiceFactoryTester

Home > @backstage/backend-test-utils > ServiceFactoryTester

A utility to help test service factories in isolation.

Signature:

class ServiceFactoryTester<TService, TScope extends 'root' | 'plugin', TInstances extends 'singleton' | 'multiton' = 'singleton'> 

Methods

Method

Modifiers

Description

from(subject, options)

static

Creates a new ServiceFactoryTester used to test the provided subject.

getService(service, args)

Return the service instance for any of the provided dependencies or built-in services.

getSubject(args)

Returns the service instance for the subject.