primevue-mirror/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.spec.js

19 lines
554 B
JavaScript
Raw Normal View History

import { mount } from '@vue/test-utils';
2022-09-06 12:03:37 +00:00
import DataViewLayoutOptions from './DataViewLayoutOptions.vue';
describe('DataViewLayoutOptions.vue', () => {
it('should exist', async () => {
const wrapper = mount(DataViewLayoutOptions, {
props: {
modelValue: 'grid'
}
});
expect(wrapper.find('.p-dataview-layout-options').exists()).toBe(true);
2022-09-14 11:26:01 +00:00
2022-09-06 12:03:37 +00:00
wrapper.vm.$emit('update:modelValue', 'list');
expect(wrapper.emitted()['update:modelValue'][0]).toEqual(['list']);
});
2022-09-14 11:26:01 +00:00
});