mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +08:00
* configured babel and jest to work with webpack * added util function to camelize object entries * added tests for apiconvert dashboard * added enaming object key function * finished refactoring of convertapi dashboard * renamed camelize to transformObject * renamed uuids to randomValues * use random strings instead of hard coded values in test * refactored dictionary.process and added tests * refactored dashboard tests - test with json objects * added first tests for apiConvert core * made camelizeObjectkeys immutable * added talismanrc to gitignore * added all tests for apiConverts core * added more dictionary tests * finished refactoring apiConverts dictionary * restructured objects in folders * refactored apiConverts persistence * refactored apiConvert pos * refactored apiConvert privateAccess * refactored apiConverts process * refactored apiConverts report * refactored apiConverts user * refactored apiConverts values * refactored apiConverts window * linted all test files * removed tests for privateAccess * removed typos from prev implementation
23 lines
624 B
JavaScript
23 lines
624 B
JavaScript
import { shallowMount } from '@vue/test-utils'
|
|
import SvgIcon from '@/components/SvgIcon/index.vue'
|
|
describe('SvgIcon.vue', () => {
|
|
it('iconClass', () => {
|
|
const wrapper = shallowMount(SvgIcon, {
|
|
propsData: {
|
|
iconClass: 'test'
|
|
}
|
|
})
|
|
expect(wrapper.find('use').attributes().href).toBe('#icon-test')
|
|
})
|
|
it('className', () => {
|
|
const wrapper = shallowMount(SvgIcon, {
|
|
propsData: {
|
|
iconClass: 'test'
|
|
}
|
|
})
|
|
expect(wrapper.classes().length).toBe(1)
|
|
wrapper.setProps({ className: 'test' })
|
|
// expect(wrapper.classes().includes('test')).toBe(true)
|
|
})
|
|
})
|