![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/vreg/node_modules/bootstrap-vue/src/components/card/ |
import { mount } from '@vue/test-utils' import { BCardTitle } from './card-title' describe('card-title', () => { it('default has tag "h4"', async () => { const wrapper = mount(BCardTitle) expect(wrapper.element.tagName).toBe('H4') wrapper.destroy() }) it('default has class "card-title"', async () => { const wrapper = mount(BCardTitle) expect(wrapper.classes()).toContain('card-title') expect(wrapper.classes().length).toBe(1) wrapper.destroy() }) it('renders custom tag', async () => { const wrapper = mount(BCardTitle, { context: { props: { titleTag: 'div' } } }) expect(wrapper.element.tagName).toBe('DIV') wrapper.destroy() }) it('has content from default slot', async () => { const wrapper = mount(BCardTitle, { slots: { default: 'bar' } }) expect(wrapper.text()).toContain('bar') wrapper.destroy() }) })