wix-style-react
Version:
wix-style-react
15 lines (12 loc) • 521 B
JavaScript
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);
});
});