2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +03:00
Files
vue-select/tests/unit/Components.spec.js
Jeff Sagal 98c278b2bb build(vite): replace webpack with Vite, add Typescript (#1594)
BREAKING: mixins are no longer exported from the index (and will likely be converted to hooks)
2022-07-18 09:33:46 -07:00

30 lines
809 B
JavaScript

import { it, describe, expect } from 'vitest'
import { defineComponent } from 'vue'
import { selectWithProps } from '@tests/helpers.js'
describe('Components API', () => {
it('swap the Deselect component', () => {
const Deselect = defineComponent('Deselect', {
render(createElement) {
return createElement('button', 'remove')
},
})
const Select = selectWithProps({ components: { Deselect } })
expect(Select.find(Deselect)).toBeTruthy()
})
it('swap the OpenIndicator component', () => {
const OpenIndicator = defineComponent('OpenIndicator', {
render(createElement) {
return createElement('i', '^')
},
})
const Select = selectWithProps({ components: { OpenIndicator } })
expect(Select.find(OpenIndicator)).toBeTruthy()
})
})