32 lines
802 B
JavaScript
32 lines
802 B
JavaScript
import { config, mount } from '@vue/test-utils';
|
|
import DataViewLayoutOptions from './DataViewLayoutOptions.vue';
|
|
|
|
config.global.mocks = {
|
|
$primevue: {
|
|
config: {
|
|
locale: {
|
|
aria: {
|
|
listView: 'listView',
|
|
gridView: 'gridView'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
|
|
describe('DataViewLayoutOptions.vue', () => {
|
|
it('should exist', async () => {
|
|
const wrapper = mount(DataViewLayoutOptions, {
|
|
props: {
|
|
modelValue: 'grid'
|
|
}
|
|
});
|
|
|
|
expect(wrapper.find('.p-dataview-layout-options').exists()).toBe(true);
|
|
|
|
wrapper.vm.$emit('update:modelValue', 'list');
|
|
|
|
expect(wrapper.emitted()['update:modelValue'][0]).toEqual(['list']);
|
|
});
|
|
});
|