diff --git a/src/components/badge/Badge.spec.js b/src/components/badge/Badge.spec.js new file mode 100644 index 000000000..1e0e3aa1c --- /dev/null +++ b/src/components/badge/Badge.spec.js @@ -0,0 +1,33 @@ +import { mount } from '@vue/test-utils'; +import Badge from './Badge.vue'; +import Button from '@/components/button/Button.vue'; + +describe('Badge.vue', () => { + it('should exist', () => { + const wrapper = mount(Badge, { + props: { + value: '29', + severity: 'warning', + size: 'large' + } + }); + + expect(wrapper.find('.p-badge.p-component').exists()).toBe(true); + expect(wrapper.find('.p-badge-warning').exists()).toBe(true); + expect(wrapper.find('.p-badge-lg').exists()).toBe(true); + expect(wrapper.find('.p-badge-no-gutter').exists()).toBe(false); + }); + + it('badge classes should exist', () => { + const wrapper = mount({ + template: '