Files
braidsbymira/src/App.test.tsx
2026-08-03 20:20:22 +00:00

26 lines
890 B
TypeScript

import { render, screen } from '@testing-library/react'
import { describe, it, expect } from 'vitest'
import App from './App'
describe('App routing', () => {
it('renders the Home page at /', () => {
render(<App initialEntries={['/']} />)
expect(screen.getByText(/your hair, your crown/i)).toBeInTheDocument()
})
it('renders the Shop page at /shop', () => {
render(<App initialEntries={['/shop']} />)
expect(screen.getByRole('heading', { name: /shop/i })).toBeInTheDocument()
})
it('renders the Book page at /book', () => {
render(<App initialEntries={['/book']} />)
expect(screen.getByRole('heading', { name: /book an appointment/i })).toBeInTheDocument()
})
it('renders the Rules page at /rules', () => {
render(<App initialEntries={['/rules']} />)
expect(screen.getByRole('heading', { name: /salon rules/i })).toBeInTheDocument()
})
})