UNPKG

@findify/react-components

Version:
30 lines (28 loc) 1.1 kB
import { shallow } from 'enzyme'; import SuggestionItem from "./view"; import { jsx as _jsx } from "react/jsx-runtime"; var theme = { "suggestion": "findify-components-autocomplete--suggestion-item__suggestion", "horizontal": "findify-components-autocomplete--suggestion-item__horizontal", "highlightedText": "findify-components-autocomplete--suggestion-item__highlightedText", "highlighted": "findify-components-autocomplete--suggestion-item__highlighted", "icon": "findify-components-autocomplete--suggestion-item__icon", "withIcon": "findify-components-autocomplete--suggestion-item__withIcon", "trending": "findify-components-autocomplete--suggestion-item__trending" }; var createAnyGetMock = function createAnyGetMock(value) { return { get: function get() { return value; } }; }; describe('SuggestionItem', function () { it('renders correctly', function () { expect(shallow( /*#__PURE__*/_jsx(SuggestionItem, { theme: theme, item: createAnyGetMock('aisaka taiga'), query: createAnyGetMock('aisa') }, "xxx"))).toMatchSnapshot(); }); });