Initialize project with basic structure, including Docker configuration, backend and frontend setup, environment configuration, and essential files for development.
This commit is contained in:
23
frontend/src/App.test.tsx
Normal file
23
frontend/src/App.test.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { cleanup, render, screen } from '@testing-library/react'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import App from './App'
|
||||
|
||||
describe('Mixmaker frontend', () => {
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
window.history.replaceState({}, '', '/')
|
||||
})
|
||||
|
||||
it('renders the event dashboard', async () => {
|
||||
window.history.replaceState({}, '', '/events')
|
||||
render(<App />)
|
||||
expect(await screen.findByRole('heading', { name: 'Your events' })).toBeInTheDocument()
|
||||
expect(screen.getByText('Saturday Night Scrim')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('renders the Discord login screen', async () => {
|
||||
window.history.replaceState({}, '', '/login')
|
||||
render(<App />)
|
||||
expect(await screen.findByRole('link', { name: /continue with discord/i })).toHaveAttribute('href', '/api/auth/discord')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user