message: chore: fixing tests for FlatRoutes
diff: import { render, RenderResult } from '@testing-library/react';
  import React, { ReactNode } from 'react';
  import { MemoryRouter, Route, Routes, useOutlet } from 'react-router-dom';
  +import { ApiProvider, ApiRegistry, LocalStorageFeatureFlags } from '../apis';
  +import { featureFlagsApiRef } from '@backstage/core-plugin-api';
  import { AppContext } from '../app';
  import { AppContextProvider } from '../app/AppContext';
  import { FlatRoutes } from './FlatRoutes';
  +const mockFeatureFlagsApi = new LocalStorageFeatureFlags();
  +const Wrapper = ({ children }: { children?: React.ReactNode }) => (
  + <ApiProvider apis={ApiRegistry.with(featureFlagsApiRef, mockFeatureFlagsApi)}>
  + {children}
  + </ApiProvider>
  +);
  +
  function makeRouteRenderer(node: ReactNode) {
  let rendered: RenderResult | undefined = undefined;
  return (path: string) => {
  const content = (
  + <Wrapper>
  <AppContextProvider
  appContext={
  ({
  @@ -36,6 +46,7 @@ function makeRouteRenderer(node: ReactNode) {
  >
  <MemoryRouter initialEntries={[path]} children={node} />
  </AppContextProvider>
  + </Wrapper>
  );
  if (rendered) {
  rendered.unmount();
  