UNPKG

ui-neu

Version:

Neu UI, a responsive React component library.

22 lines 721 B
import React from 'react'; import { act } from 'react-dom/test-utils'; import { render, unmountComponentAtNode } from 'react-dom'; import { CardTitle } from './CardTitle'; describe('CardTitle test suite', function () { var container = null; beforeEach(function () { container = document.createElement('div'); document.body.appendChild(container); }); afterEach(function () { unmountComponentAtNode(container); container.remove(); container = null; }); it('renders CardTitle children props', function () { act(function () { render( /*#__PURE__*/React.createElement(CardTitle, null, "Card Title"), container); }); expect(container.textContent).toBe('Card Title'); }); });