Skip to content

Commit

Permalink
fix: modify path import dynamic icon
Browse files Browse the repository at this point in the history
  • Loading branch information
hcarmonas committed Jun 22, 2022
1 parent 8553b71 commit 56853e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Icon/Icon.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Icon - Unit', () => {
it('should emits click on click in icon', async () => {
jest.spyOn(wrapper.vm, '$emit');

const IconRemove = await import('@img/icon/icon-remove.svg');
const IconRemove = await import('../../assets/img/icon/icon-remove.svg');
wrapper.findComponent(IconRemove).vm.$emit('click');

expect(wrapper.vm.$emit).toHaveBeenCalledWith('click');
Expand Down
2 changes: 1 addition & 1 deletion src/components/Icon/Icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
},
computed: {
dynamicIcon() {
return () => import(`@img/icon/icon-${this.type}.svg`);
return () => import(`../../assets/img/icon/icon-${this.type}.svg`);
},
},
methods: {
Expand Down

0 comments on commit 56853e0

Please sign in to comment.