import { renderHook } from '@testing-library/react-hooks'; import { localPluginType, useCreatePluginInstance } from '../index'; describe('useCreatePluginInstance', () => { test('should create plugin instance with local plugin', () => { const pluginName = 'testPlugin'; const localPlugin = { name: 'localPlugin' }; const { result } = renderHook(() => useCreatePluginInstance( pluginName, localPlugin as unknown as localPluginType, ), ); expect(result.current).toBeDefined(); // Add more assertions for the created plugin instance }); test('should create plugin instance without local plugin', () => { const pluginName = 'testPlugin'; const { result } = renderHook(() => useCreatePluginInstance(pluginName)); expect(result.current).toBeDefined(); // Add more assertions for the created plugin instance }); });