mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
23 lines
656 B
TypeScript
23 lines
656 B
TypeScript
import { render } from 'utils/testRenderer';
|
|
import { Route, Routes } from 'react-router-dom';
|
|
import BreadcrumbNav from './BreadcrumbNav';
|
|
import { screen } from '@testing-library/react';
|
|
|
|
test('decode URI encoded path in breadcrumbs nav', async () => {
|
|
render(
|
|
<Routes>
|
|
<Route
|
|
path={'/applications/:name/:instance'}
|
|
element={<BreadcrumbNav />}
|
|
/>
|
|
</Routes>,
|
|
{
|
|
route: '/applications/my%20app/my%20instance',
|
|
},
|
|
);
|
|
|
|
await screen.findByText('applications');
|
|
await screen.findByText('my app');
|
|
await screen.findByText('my instance');
|
|
});
|