import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { BrowserRouter } from 'react-router-dom';
import NotFound from './NotFound';

describe('NotFound 组件', () => {
  it('应该渲染 404 页面', () => {
    render(
      <BrowserRouter>
        <NotFound />
      </BrowserRouter>
    );
    
    expect(screen.getByText('404')).toBeInTheDocument();
    expect(screen.getByText('抱歉，您访问的页面不存在。')).toBeInTheDocument();
    expect(screen.getByText('返回首页')).toBeInTheDocument();
  });
});