Files
directus/.jest/mount-composition.ts
Rijk van Zanten 47649d29a4 [WIP] Add v-item-group and v-item (#121)
* Add v-item-group / v-item / groupable compositions

* Add support for multiple prop

* Handle internal selection, prepare for custom v-model

* Support v-model in item-group

* Add docs

* Register new components

* Fix typing of and add tests for array equal util

* Move is-empty to util

* Base all internal state on index / value instead of id

* Cleanup usage of groupableParent

* Add support for max option

* Add support for mandatory

* Add docs / cleanup code

* Add full test coverage for groupable compositions

* Add tests for v-item / v-item-group
2020-02-27 09:57:05 -05:00

23 lines
431 B
TypeScript

import VueCompositionAPI from '@vue/composition-api';
import { mount, createLocalVue } from '@vue/test-utils';
const localVue = createLocalVue();
localVue.use(VueCompositionAPI);
export default function mountComposition(cb: () => any, mountOptions?: Parameters<typeof mount>[1]) {
return mount(
{
setup() {
return cb();
},
render(h) {
return h('div');
}
},
{
localVue,
...mountOptions
}
);
};