1
0
mirror of synced 2024-11-23 05:46:05 +03:00
vue-formulario/test/unit/Formulario.test.js

20 lines
540 B
JavaScript
Raw Normal View History

import Formulario from '@/index.ts'
2020-05-22 14:22:16 +03:00
describe('Formulario', () => {
it('Installs on vue instance', () => {
2020-05-22 14:22:16 +03:00
const components = [
'FormularioForm',
'FormularioInput',
'FormularioGrouping',
]
const registry = []
function Vue () {}
Vue.component = function (name, instance) {
registry.push(name)
}
Formulario.install(Vue)
2020-05-22 14:22:16 +03:00
expect(Vue.prototype.$formulario).toBe(Formulario)
expect(registry).toEqual(components)
})
})