You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Vue from 'vue'
import { mount } from '@vue/test-utils'
import router from '@/router'
import VueI18n from 'vue-i18n'
import Vuelidate from 'vuelidate'
import BootstrapVue from 'bootstrap-vue'
import feather from 'vue-icon'
import DropdownIcon from '@/components/molecules/DropdownIcon'
describe('DropdownIcon', () => {
const wrapper = mount(DropdownIcon)
const vm = wrapper.vm
it('should be a Vue instance', () => {
expect(wrapper.isVueInstance()).toBeTruthy()
})
})
What is expected
vue-icon is imported and used in component - so component can be tested correctly.
What is actually happening
FAIL test\unit\specs\DropdownIcon.spec.js
● Test suite failed to run
C:\Users\User\Development\project_name\node_modules\vue-icon\lib\vue-feather-plugin.esm.js:133
export default install;
^^^^^^
SyntaxError: Unexpected token export
6 | import Vuelidate from 'vuelidate'
7 | import BootstrapVue from 'bootstrap-vue'
> 8 | import feather from 'vue-icon'
9 |
10 | import DropdownIcon from '@/components/molecules/DropdownIcon'
11 |
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)
at Object.<anonymous> (test/unit/specs/DropdownIcon.spec.js:8:16)
Other information
When I run npm run dev the code compiles and builds out correctly, and vue-icon works as intended.
I only get this problem when I run npm run unit.
My other tests on components which don't use vue-icon work as intended. I believe this has something to do with vue-icon using uncompiled ES6 code? Please correct me if I'm wrong.
Thank you for your time!
The text was updated successfully, but these errors were encountered:
Looks like this project is no longer maintained, I'm not sure if it's support Vue 3, the best icon package -IMO- for Vue at the moment is @iconify/vue by far.
Version
2.0.0
Steps to reproduce
What is expected
vue-icon is imported and used in component - so component can be tested correctly.
What is actually happening
Other information
When I run
npm run dev
the code compiles and builds out correctly, and vue-icon works as intended.I only get this problem when I run
npm run unit
.My other tests on components which don't use vue-icon work as intended. I believe this has something to do with vue-icon using uncompiled ES6 code? Please correct me if I'm wrong.
Thank you for your time!
The text was updated successfully, but these errors were encountered: