import { renderHook } from '@testing-library/react';
import { useTableContext } from '../context';

describe('useTableContext', () => {
    test('throws exception if no context', () => {
        const spy = vitest.spyOn(console, 'error').mockImplementation(() => {});
        expect(() => renderHook(() => useTableContext())).toThrow(
            'Failed to get table context. No context available.'
        );
        spy.mockRestore();
    });
});
