mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
12 lines
474 B
TypeScript
12 lines
474 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { renderHook } from '@testing-library/react';
|
|
import { useConsoleError } from './useConsoleError';
|
|
|
|
describe('useConsoleError', () => {
|
|
it('should throw error when used outside ConsoleErrorProvider', () => {
|
|
// Expect the hook to throw when not wrapped in provider
|
|
expect(() => {
|
|
renderHook(() => useConsoleError());
|
|
}).toThrow('useConsoleError must be used within a ConsoleErrorProvider');
|
|
});
|
|
}); |