UNPKG

@navinc/base-react-components

Version:
22 lines 1.29 kB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; import { jsx as _jsx } from "react/jsx-runtime"; import { describe, expect, it } from 'vitest'; import { renderWithContext } from './tests/with-app-context.js'; import { screen } from '@testing-library/react'; import { Icon } from './icon.js'; describe('Icon', () => { it('renders a svg if a proper name is supplied', () => __awaiter(void 0, void 0, void 0, function* () { renderWithContext(_jsx(Icon, { name: "actions/close" })); const icon = yield screen.findByTestId('icon:actions/close'); expect(icon).toBeInTheDocument(); })); }); //# sourceMappingURL=icon.spec.js.map