UNPKG

wix-style-react

Version:
15 lines (12 loc) 521 B
import React from 'react'; import { componentFactory, unitDriverFactory } from './testkit/Unit'; describe('<Unit/>', function () { var createDriver = function createDriver(props) { return unitDriverFactory(componentFactory(props)); }; it('should create a unit and render the given children', function () { var driver = createDriver({ children: React.createElement('div', { className: 'smth' }) }); expect(driver.isEmpty()).toEqual(false); expect(driver.hasChild('.smth')).toEqual(true); }); });