Last active
July 8, 2020 03:54
-
-
Save if540/fe2b858b0fc994795974a53c94646344 to your computer and use it in GitHub Desktop.
vue js plugin component template for install code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Radio from './Radio' | |
import Gropu from './Group' | |
Radio.Gropu = Gropu | |
Radio.install = function(Vue) { | |
Vue.component(Radio.name, Radio | |
Vue.component(Radio.Group.name, Radio.Group) | |
} | |
export { Group } | |
export default Radio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { shallowMount } from '@vue/test-utils' | |
import Radio from './Radio' | |
let wrapper = null | |
beforeEach(() => { | |
wrapper = shallowMount(Radio) | |
}) | |
afterEach(() => { | |
wrapper.destroy() | |
}) | |
describe('Radio component test', () => { | |
it('create', () => { | |
expect(wrapper.text()).toBe('hello radio jsx component test prop') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment