import React from 'react';
import { renderHook } from '@testing-library/react';
import { AppConfigContext, SuiteAppConfig } from '@theorchard/suite-frontend';
import { useWorkstationConfig } from '../context';

describe('useWorkstationConfig', () => {
    const config = {} as SuiteAppConfig;

    test('returns workstation app config', () => {
        const result = renderHook(() => useWorkstationConfig(), {
            wrapper: ({ children }: { children: React.ReactNode }) => (
                <AppConfigContext.Provider value={{ config }}>
                    {children}
                </AppConfigContext.Provider>
            ),
        });

        expect(result.result.current).toBe(config);
    });
});
