Create InlineMessage.spec.js

pull/2305/head
Tuğçe Küçükoğlu 2022-03-10 13:40:39 +03:00 committed by Tuğçe Küçükoğlu
parent da4a6d32ce
commit 6c9544e53f
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { mount } from '@vue/test-utils';
import InlineMessage from './InlineMessage.vue';
describe('InlineMessage.vue', () => {
it('should exist', () => {
const wrapper = mount(InlineMessage, {
slots: {
default: 'Username is required'
},
props: {
severity: 'error',
}
});
expect(wrapper.find('.p-inline-message.p-component').exists()).toBe(true);
expect(wrapper.find('.p-inline-message.p-component').text()).toBe('Username is required');
expect(wrapper.find('.p-inline-message-error').exists()).toBe(true);
});
});