wix-style-react
Version:
wix-style-react
20 lines (17 loc) • 775 B
JavaScript
import React from 'react';
import { shallow } from 'enzyme';
import Content from '.';
import EmptyState from '../../EmptyState';
import styles from './Content.scss';
describe('Card.Content', function () {
describe('`children` prop', function () {
it('should add `emptyStateContent` when `EmptyState`', function () {
var component = shallow(React.createElement(Content, { children: React.createElement(EmptyState, null) }));
expect(component.hasClass(styles.emptyStateContent)).toBe(true);
});
it('should not add `emptyStateContent` when not `EmptyState`', function () {
var component = shallow(React.createElement(Content, { children: 'hello' }));
expect(component.hasClass(styles.emptyStateContent)).not.toBe(true);
});
});
});