Skip to content

Commit

Permalink
Fixes #1285 - Update the test with the label emit the event
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles committed Nov 7, 2018
1 parent 3e0a585 commit 3d63d96
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/clay-label/src/__tests__/ClayLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ describe('ClayLabel', function() {
label.refs.closeButton.element.click();

expect(spy).toHaveBeenCalled();
expect(spy).toHaveBeenCalledWith('close');
expect(spy).toHaveBeenCalledWith(
expect.objectContaining({
data: {
label: expect.any(String),
},
name: 'close',
originalEvent: expect.any(Object),
})
);
});
});

0 comments on commit 3d63d96

Please sign in to comment.