Refactor and fix main app tests

This commit is contained in:
Alejandro Celaya
2023-08-04 08:56:06 +02:00
parent c794ff8b58
commit c4d7ac272b
29 changed files with 162 additions and 160 deletions

View File

@@ -8,7 +8,7 @@ describe('<App />', () => {
const App = createApp(
() => <>MainHeader</>,
() => <>Home</>,
() => <>MenuLayout</>,
() => <>ShlinkWebComponentContainer</>,
() => <>CreateServer</>,
() => <>EditServer</>,
() => <>SettingsComp</>,
@@ -47,8 +47,8 @@ describe('<App />', () => {
['/server/create', 'CreateServer'],
['/server/abc123/edit', 'EditServer'],
['/server/def456/edit', 'EditServer'],
['/server/abc123/foo', 'MenuLayout'],
['/server/def456/bar', 'MenuLayout'],
['/server/abc123/foo', 'ShlinkWebComponentContainer'],
['/server/def456/bar', 'ShlinkWebComponentContainer'],
['/other', 'Oops! We could not find requested route.'],
])('renders expected route', async (activeRoute, expectedComponent) => {
setUp(activeRoute);