1
0
mirror of synced 2024-11-22 21:36:04 +03:00
vue-formulario/test/unit/Formulario.test.js

19 lines
502 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 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([
'FormularioForm',
'FormularioGrouping',
'FormularioInput',
])
2020-05-22 14:22:16 +03:00
})
})