Skip to content

Commit

Permalink
update suggestor.specs
Browse files Browse the repository at this point in the history
  • Loading branch information
carloluis committed Feb 10, 2018
1 parent 6f6f0f8 commit 153fba1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/suggestor/__tests__/Suggestor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jest.mock('../../utils/noop', () => {

const PROPS = {
list: ['temporise', 'whencesoeve', 'turophile', 'umlaut'],
onChange: jest.fn(),
onSelect: jest.fn(),
onChange: jest.fn().mockName('oChangeMock'),
onSelect: jest.fn().mockName('onSelectMock'),
onKey: jest.fn(),
value: '',
openOnClick: false,
Expand Down Expand Up @@ -46,20 +46,17 @@ describe('<Ssuggestor />', () => {
it('snapshot - with suggestions visible', () => {
const tree = renderer.create(<Suggestor {...PROPS} openOnClick />);
tree.getInstance().setState({ open: true });

expect(tree).toMatchSnapshot();
});

it('snapshot - with arrow', () => {
const tree = renderer.create(<Suggestor {...PROPS} arrow />);

expect(tree).toMatchSnapshot();
});

it('snapshot - with close', () => {
const tree = renderer.create(<Suggestor {...PROPS} close />);
tree.getInstance().setState({ value: 'temp' });

expect(tree).toMatchSnapshot();
});
});
Expand Down

0 comments on commit 153fba1

Please sign in to comment.