import { mount } from '@vue/test-utils'; import BadgeDirective from './BadgeDirective'; describe('directive badge should exist', () => { it('positioned badge', () => { const wrapper = mount({ template: '', directives: { badge: BadgeDirective } }); expect(wrapper.find('.p-overlay-badge').exists()).toBe(true); expect(wrapper.find('.p-badge.p-component').exists()).toBe(true); expect(wrapper.find('.p-badge.p-component').text()).toBe('2'); }); });