Skip to content

Commit

Permalink
Merge pull request #71 from robcresswell/fix/correctly-pass-attrs
Browse files Browse the repository at this point in the history
fix: correctly pass attrs to component
  • Loading branch information
robcresswell authored Nov 16, 2019
2 parents 62fb0a7 + 2e0e866 commit aef2aaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions __tests__/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('Icon', () => {
});

it('listens to a click event', () => {
const clickListener = jest.fn()
const clickListener = jest.fn();
const iconWithEvent = mount({
name: 'IconWithEvent',
components: { AndroidIcon },
Expand All @@ -63,9 +63,9 @@ describe('Icon', () => {
methods: {
clickListener,
},
})
});

iconWithEvent.trigger('click')
expect(clickListener).toBeCalled()
iconWithEvent.trigger('click');
expect(clickListener).toBeCalled();
});
});
1 change: 1 addition & 0 deletions template.mst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:class="[data.class, data.staticClass]"
class="material-design-icon <%title%>-icon"
role="img"
v-bind="data.attrs"
v-on="listeners">
<svg :fill="props.fillColor"
class="material-design-icon__svg"
Expand Down

0 comments on commit aef2aaa

Please sign in to comment.