()
| 51 | } |
| 52 | |
| 53 | export function useRoleTesting() { |
| 54 | const context = useContext(RoleTestingContext); |
| 55 | if (context === undefined) { |
| 56 | throw new Error('useRoleTesting must be used within a RoleTestingProvider'); |
| 57 | } |
| 58 | return context; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Safe version of useRoleTesting that returns null/no-op values when outside the provider. |
no outgoing calls
no test coverage detected