Makelore 2.0 initial clean snapshot
This commit is contained in:
20
tests/unit/subagents-page.test.tsx
Normal file
20
tests/unit/subagents-page.test.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { Subagents } from '@/pages/Subagents';
|
||||
|
||||
describe('Subagents retired route', () => {
|
||||
it('redirects the old course path page to the opencode chat page', async () => {
|
||||
render(
|
||||
<MemoryRouter initialEntries={['/subagents']}>
|
||||
<Routes>
|
||||
<Route path="/subagents" element={<Subagents />} />
|
||||
<Route path="/opencode-chat" element={<div data-testid="opencode-chat-page" />} />
|
||||
</Routes>
|
||||
</MemoryRouter>,
|
||||
);
|
||||
|
||||
expect(await screen.findByTestId('opencode-chat-page')).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('subagents-page')).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user