Skip to content

Commit

Permalink
Added frontend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slashexx committed Nov 2, 2024
1 parent 5146a8b commit 0556447
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion frontend/src/IntroPage.test.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { render, screen } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom'
import IntroPage from './IntroPage';

test('renders CodeBrewery title', () => {
render(<IntroPage />);
render(
<BrowserRouter>
<IntroPage />
</BrowserRouter>);
const titleElement = screen.getByText(/CodeBrewery/i);
expect(titleElement).toBeInTheDocument();
});
2 changes: 1 addition & 1 deletion frontend/src/IntroPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Code2, Sparkles, Terminal, Cpu, Beer, Wine } from 'lucide-react';
import { useNavigate } from 'react-router-dom';

export function IntroPage() {
export default function IntroPage() {
const navigate = useNavigate();

return (
Expand Down

0 comments on commit 0556447

Please sign in to comment.