Skip to main content
Glama
deleonio
by deleonio
snapshot.test.tsx852 B
import { h } from '@stencil/core'; import type { W3CInputValue } from '../../../schema'; import { renderFunctionalComponentToSpecPage } from '../../../utils/testing'; import SuggestionsFc from '../Suggestions'; describe('SuggestionsFc', () => { it('should render correctly', async () => { const page = await renderFunctionalComponentToSpecPage(() => <SuggestionsFc id="test-id" suggestions={[]} />); expect(page.root).toMatchSnapshot(); expect(page.root?.tagName).toBe('DATALIST'); }); it('should render with suggestions', async () => { const suggestions: W3CInputValue[] = ['Option 1', 'Option 2']; const page = await renderFunctionalComponentToSpecPage(() => <SuggestionsFc id="test-id" suggestions={suggestions} />); expect(page.root).toMatchSnapshot(); expect(page.root?.getElementsByTagName('option')).toHaveLength(2); }); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deleonio/public-ui-kolibri'

If you have feedback or need assistance with the MCP directory API, please join our Discord server