All files / src/utils wrappers.tsx

26.66% Statements 4/15
100% Branches 0/0
100% Functions 0/0
42.85% Lines 3/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28        14x       14x   14x                                  
import { BrowserRouter as Router } from "react-router-dom";
import { AuthProvider } from "../contexts/AuthContext";
 
// Main wrapper that includes all necessary providers
export const AllProviders: React.FC<{ children: React.ReactNode }> = ({
  children,
}) => {
  return (
    <Router>
      <AuthProvider>{children}</AuthProvider>
    </Router>
  );
};
 
// Router-only wrapper for tests that don't need auth
export const RouterWrapper: React.FC<{ children: React.ReactNode }> = ({
  children,
}) => {
  return <Router>{children}</Router>;
};
 
// Auth-only wrapper for tests that don't need routing
export const AuthWrapper: React.FC<{ children: React.ReactNode }> = ({
  children,
}) => {
  return <AuthProvider>{children}</AuthProvider>;
};