primevue-mirror/components/lib/inlinemessage/InlineMessage.spec.js

20 lines
641 B
JavaScript
Raw Normal View History

2022-09-06 12:03:37 +00:00
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: {
2022-09-14 11:26:01 +00:00
severity: 'error'
2022-09-06 12:03:37 +00:00
}
});
expect(wrapper.find('.p-inlinemessage.p-component').exists()).toBe(true);
expect(wrapper.find('.p-inlinemessage.p-component').text()).toBe('Username is required');
expect(wrapper.find('.p-inlinemessage-error').exists()).toBe(true);
2022-09-06 12:03:37 +00:00
});
2022-09-14 11:26:01 +00:00
});