react-chips-devitjobs
Version:
A flexible and easy to use Chips component for React
34 lines (23 loc) • 510 B
JavaScript
import React from 'react';
import { shallow } from 'enzyme';
import Chips from '../src/Chips';
const minProps = {
value: [],
onChange: () => {}
};
const withChipTheme = {
...minProps,
chipTheme: { chip: { padding: 100 } }
}
test('Renders without exploding', () => {
const chips = shallow(
<Chips {...minProps} />
);
expect(chips);
});
test('Renders with chipTheme without exploiding', () => {
const chips = shallow(
<Chips {...withChipTheme} />
);
expect(chips);
});