mirror of
https://github.com/directus/directus.git
synced 2026-02-01 13:24:59 -05:00
* 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
23 lines
431 B
TypeScript
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
|
|
}
|
|
);
|
|
};
|