From bba525be4d9312705e15cae6647a7daebaf43237 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 11 Mar 2025 00:02:29 +0100 Subject: [PATCH] frontend-test-utils: removed deprecated setupRequestMockHandlers Signed-off-by: Patrik Oldsberg --- .changeset/giant-phones-melt.md | 5 ++++ packages/frontend-test-utils/report.api.md | 7 ----- .../frontend-test-utils/src/deprecated.ts | 29 ------------------- packages/frontend-test-utils/src/index.ts | 1 - 4 files changed, 5 insertions(+), 37 deletions(-) create mode 100644 .changeset/giant-phones-melt.md delete mode 100644 packages/frontend-test-utils/src/deprecated.ts diff --git a/.changeset/giant-phones-melt.md b/.changeset/giant-phones-melt.md new file mode 100644 index 0000000000..1506e2d0f3 --- /dev/null +++ b/.changeset/giant-phones-melt.md @@ -0,0 +1,5 @@ +--- +'@backstage/frontend-test-utils': minor +--- + +**BREAKING**: Removed deprecated `setupRequestMockHandlers` which was replaced by `registerMswTestHooks`. diff --git a/packages/frontend-test-utils/report.api.md b/packages/frontend-test-utils/report.api.md index fd6aba0223..e14c971419 100644 --- a/packages/frontend-test-utils/report.api.md +++ b/packages/frontend-test-utils/report.api.md @@ -120,13 +120,6 @@ export function renderInTestApp( options?: TestAppOptions, ): RenderResult; -// @public @deprecated (undocumented) -export function setupRequestMockHandlers(worker: { - listen: (t: any) => void; - close: () => void; - resetHandlers: () => void; -}): void; - export { TestApiProvider }; export { TestApiProviderProps }; diff --git a/packages/frontend-test-utils/src/deprecated.ts b/packages/frontend-test-utils/src/deprecated.ts deleted file mode 100644 index 1b67f73e6b..0000000000 --- a/packages/frontend-test-utils/src/deprecated.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright 2024 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { registerMswTestHooks } from '@backstage/test-utils'; - -/** - * @public - * @deprecated Use `registerMswTestHooks` from `@backstage/frontend-test-utils` instead. - */ -export function setupRequestMockHandlers(worker: { - listen: (t: any) => void; - close: () => void; - resetHandlers: () => void; -}): void { - registerMswTestHooks(worker); -} diff --git a/packages/frontend-test-utils/src/index.ts b/packages/frontend-test-utils/src/index.ts index 20f393706e..cab66895e0 100644 --- a/packages/frontend-test-utils/src/index.ts +++ b/packages/frontend-test-utils/src/index.ts @@ -20,7 +20,6 @@ * Contains utilities that can be used when testing frontend features such as extensions. */ -export * from './deprecated'; export * from './apis'; export * from './app';