Create Divider.spec.js

pull/2305/head
Tuğçe Küçükoğlu 2022-03-10 13:39:28 +03:00 committed by Tuğçe Küçükoğlu
parent 99879e50fb
commit 787cbb374c
1 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,26 @@
import { mount } from '@vue/test-utils';
import Divider from './Divider.vue';
describe('Divider.vue', () => {
it('should exist', () => {
const wrapper = mount(Divider);
expect(wrapper.find('.p-divider.p-component').exists()).toBe(true);
expect(wrapper.find('.p-divider.p-component').classes()).toContain('p-divider-horizontal');
expect(wrapper.find('.p-divider.p-component').classes()).toContain('p-divider-left');
});
it('should exist', () => {
const wrapper = mount(Divider, {
props: {
layout: 'vertical',
align: 'center',
type: 'dashed'
}
});
expect(wrapper.find('.p-divider-vertical').exists()).toBe(true);
expect(wrapper.find('.p-divider-dashed').exists()).toBe(true);
expect(wrapper.find('.p-divider-center').exists()).toBe(true);
});
});