Refactor backend-test-utils
Co-authored-by: Fredrik Adelöw <freben@users.noreply.github.com> Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { createServiceRef } from '@backstage/backend-plugin-api';
|
||||
import { createExtensionPoint } from '@backstage/backend-plugin-api';
|
||||
import { EntityProvider } from './api';
|
||||
import { CatalogProcessor } from './api/processor';
|
||||
|
||||
@@ -29,6 +29,6 @@ export interface CatalogProcessingExtensionPoint {
|
||||
* @alpha
|
||||
*/
|
||||
export const catalogProcessingExtensionPoint =
|
||||
createServiceRef<CatalogProcessingExtensionPoint>({
|
||||
createExtensionPoint<CatalogProcessingExtensionPoint>({
|
||||
id: 'catalog.processing',
|
||||
});
|
||||
|
||||
@@ -23,8 +23,9 @@ describe('ScaffolderCatalogModule', () => {
|
||||
it('should register the extension point', async () => {
|
||||
const extensionPoint = { addProcessor: jest.fn() };
|
||||
await startTestBackend({
|
||||
services: [[catalogProcessingExtensionPoint, extensionPoint]],
|
||||
registrables: [scaffolderCatalogModule({})],
|
||||
services: [],
|
||||
extensionPoints: [[catalogProcessingExtensionPoint, extensionPoint]],
|
||||
features: [scaffolderCatalogModule({})],
|
||||
});
|
||||
|
||||
expect(extensionPoint.addProcessor).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user