1
0
mirror of synced 2024-11-26 15:26:02 +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
})
})