1
0
mirror of synced 2024-11-26 23:36:02 +03:00
vue-formulario/test/unit/Formulario.test.js
Zaytsev Kirill 467dca656b refactor: Validation logic refactor, additional typehints, removed dead code
BREAKING CHANGE: Plugin system removed
2020-10-22 10:59:47 +03:00

20 lines
540 B
JavaScript

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