Create DataViewLayoutOptions.spec.js

pull/2305/head
Tuğçe Küçükoğlu 2022-03-10 13:38:50 +03:00 committed by Tuğçe Küçükoğlu
parent c5ccfba2de
commit 07fcb3db01
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { mount } from '@vue/test-utils';
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);
expect(wrapper.find('.p-highlight > .pi-th-large').exists()).toBe(true);
wrapper.vm.$emit('update:modelValue', 'list');
expect(wrapper.emitted()['update:modelValue'][0]).toEqual(['list']);
});
});