import React from 'react';
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import { ToastProvider } from '@/components/Toast';

// Simple test component
const TestComponent = () => {
  return (
    <div>
      <h1>Toast Test</h1>
    </div>
  );
};

const renderWithToast = (component: React.ReactElement) => {
  return render(
    <ToastProvider>
      {component}
    </ToastProvider>
  );
};

describe('Toast Component', () => {
  it('renders ToastProvider without crashing', () => {
    renderWithToast(<TestComponent />);
    expect(screen.getByText('Toast Test')).toBeInTheDocument();
  });

  it('provides toast context', () => {
    // Simple test to ensure the provider works
    const { container } = renderWithToast(<TestComponent />);
    expect(container).toBeInTheDocument();
  });
});
